Skip to content

Commit

Permalink
Fix pre-commit (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Sep 21, 2023
1 parent a7e35ba commit e3e8dbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
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

0 comments on commit e3e8dbc

Please sign in to comment.