Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pre-commit #113

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meeseeksdev/meeseeksbox/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def fn(req, url):
req = requests.Request("POST", url, headers=headers, data=req.body)
prepared = req.prepare()
with requests.Session() as s:
res = s.send(prepared)
res = s.send(prepared) # type:ignore[attr-defined]
return res
except Exception:
import traceback
Expand Down
14 changes: 7 additions & 7 deletions meeseeksdev/meeseeksbox/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _integration_authenticated_request(self, method, url, json=None):
req = requests.Request(method, url, headers=headers, json=json)
prepared = req.prepare()
with requests.Session() as s:
return s.send(prepared)
return s.send(prepared) # type:ignore[attr-defined]


class Forbidden(Exception):
Expand Down Expand Up @@ -273,13 +273,13 @@ def prepare():
return req.prepare()

with requests.Session() as s:
response = s.send(prepare())
response = s.send(prepare()) # type:ignore[attr-defined]
if response.status_code == 401:
self.regen_token()
response = s.send(prepare())
response = s.send(prepare()) # type:ignore[attr-defined]
if raise_for_status:
response.raise_for_status()
return response
return response # type:ignore[no-any-return]

def ghrequest(
self,
Expand Down Expand Up @@ -307,10 +307,10 @@ def prepare():
return req.prepare()

with requests.Session() as s:
response = s.send(prepare())
response = s.send(prepare()) # type:ignore[attr-defined]
if response.status_code == 401:
self.regen_token()
response = s.send(prepare())
response = s.send(prepare()) # type:ignore[attr-defined]
if raise_for_status:
response.raise_for_status()
rate_limit = response.headers.get("X-RateLimit-Limit", -1)
Expand All @@ -333,7 +333,7 @@ def prepare():
"installation": repo_name,
},
)
return response
return response # type:ignore[no-any-return]

def _get_permission(self, org: str, repo: str, username: str) -> Permission:
get_collaborators_query = API_COLLABORATORS_TEMPLATE.format(
Expand Down