mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-14 21:24:59 +00:00
Lint
This commit is contained in:
parent
1a8cfd18ff
commit
4e680858ed
3 changed files with 3 additions and 5 deletions
|
@ -47,6 +47,7 @@ class RatelimitReached(GitHubError):
|
|||
f" {human_readable_time_until(datetime.now(timezone.utc) - self.reset_time)}"
|
||||
)
|
||||
|
||||
|
||||
def error_from_request(request: ClientResponse, /) -> BaseHTTPError:
|
||||
# TODO: Make specific errrors
|
||||
return HTTPError(request)
|
||||
|
|
|
@ -11,8 +11,8 @@ from typing import TYPE_CHECKING, Any, Awaitable, Dict, List, Literal, NamedTupl
|
|||
|
||||
from aiohttp import ClientSession, TraceConfig, __version__ as aiohttp_verrsion
|
||||
|
||||
from ..utils import human_readable_time_until
|
||||
from ..errors import error_from_request
|
||||
from ..utils import human_readable_time_until
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from types import SimpleNamespace
|
||||
|
@ -23,6 +23,7 @@ if TYPE_CHECKING:
|
|||
from ..objects import File
|
||||
from ..types import SecurtiyAndAnalysis
|
||||
|
||||
|
||||
log = logging.getLogger("github")
|
||||
|
||||
|
||||
|
|
|
@ -14,10 +14,6 @@ from typing import TYPE_CHECKING, Optional
|
|||
if TYPE_CHECKING:
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from aiohttp import ClientResponse
|
||||
|
||||
from .errors import BaseHTTPError
|
||||
|
||||
|
||||
def human_readable_time_until(td: timedelta, /) -> str:
|
||||
seconds = int(td.total_seconds())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue