mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-14 21:24:59 +00:00
Fix pyright
This commit is contained in:
parent
ddc5934a13
commit
a1aa9dd1b2
2 changed files with 3 additions and 3 deletions
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run Unimport
|
- name: Run Unimport
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: unimport ./ --ignore-init --gitignore -r
|
run: unimport ./ --ignore-init --gitignore --remove
|
||||||
|
|
||||||
- name: Run Isort
|
- name: Run Isort
|
||||||
run: isort ./
|
run: isort ./
|
||||||
|
|
|
@ -173,7 +173,7 @@ class HTTPClient:
|
||||||
if self.is_ratelimited:
|
if self.is_ratelimited:
|
||||||
log.info(
|
log.info(
|
||||||
"Ratelimit exceeded, trying again in"
|
"Ratelimit exceeded, trying again in"
|
||||||
f" {human_readable_time_until(self._rates.reset_time - datetime.now(timezone.utc))} (URL:" # type: ignore
|
f" {human_readable_time_until(self._rates.reset_time - datetime.now(timezone.utc))} (URL:"
|
||||||
f" {path}, method: {method})"
|
f" {path}, method: {method})"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ class HTTPClient:
|
||||||
# this might not be a good idea, might make
|
# this might not be a good idea, might make
|
||||||
# this raise an error instead.
|
# this raise an error instead.
|
||||||
await asyncio.sleep(
|
await asyncio.sleep(
|
||||||
max((self._rates.reset_time - datetime.now(timezone.utc)).total_seconds(), 0) # type: ignore
|
max((self._rates.reset_time - datetime.now(timezone.utc)).total_seconds(), 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
async with self.__session.request(
|
async with self.__session.request(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue