mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-17 22:45:08 +00:00
Third times a charm
This commit is contained in:
parent
6797dc8a4f
commit
153e1e50d4
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ from getpass import getpass
|
|||
import aiohttp
|
||||
|
||||
import http
|
||||
from exceptions import AlreadyStarted, NotStarted
|
||||
import exceptions
|
||||
from objects import User, Repository
|
||||
|
||||
class Github:
|
||||
|
@ -35,7 +35,7 @@ class Github:
|
|||
|
||||
def check_limits(self, as_dict: bool = False) -> dict[str, str | int] | list[str]:
|
||||
if not self.has_started:
|
||||
raise NotStarted
|
||||
raise exceptions.NotStarted
|
||||
if not as_dict:
|
||||
output = []
|
||||
for key, value in self.session._rates._asdict().items():
|
||||
|
@ -52,7 +52,7 @@ class Github:
|
|||
async def start(self) -> None:
|
||||
"""Main entry point to the wrapper, this creates the ClientSession."""
|
||||
if self.has_started:
|
||||
raise AlreadyStarted
|
||||
raise exceptions.AlreadyStarted
|
||||
self.session = await http.make_session(headers=self._headers, authorization=self._auth)
|
||||
self.has_started = True
|
||||
return self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue