diff --git a/Github/http.py b/Github/http.py index 84528a0..f2c25a7 100644 --- a/Github/http.py +++ b/Github/http.py @@ -11,15 +11,13 @@ from types import SimpleNamespace from typing import TYPE_CHECKING, Dict, Union, List import platform -if TYPE_CHECKING: - from .main import File - import aiohttp from .exceptions import * from .exceptions import GistNotFound, RepositoryAlreadyExists, MissingPermissions -from .objects import APIObject, User, Gist, Repository, Organization +from .objects import APIObject, User, Gist, Repository, Organization, File from .urls import * + __version__ = '0.0.1' __all__ = ( diff --git a/Github/main.py b/Github/main.py index 5f6150d..0f307e4 100644 --- a/Github/main.py +++ b/Github/main.py @@ -16,8 +16,6 @@ from . import exceptions from .cache import RepoCache, UserCache from .http import http from .objects import Gist, Issue, Organization, Repository, User, File -from .urls import BASE_URL - class GHClient: _auth = None @@ -46,7 +44,7 @@ class GHClient: return self.start().__await__() def __repr__(self) -> str: - return f'<{self.__class__.__name__}; has_auth={bool(self._auth)}>' + return f'<{self.__class__.__name__} has_auth={bool(self._auth)}>' def __del__(self): asyncio.create_task(self.http.session.close()) @@ -59,7 +57,7 @@ class GHClient: for key, value in self.http.session._rates._asdict().items(): output.append(f'{key} : {value}') return output - return self.http.session._rates._asdict() + return self.http.session._rates async def update_auth(self, username: str, token: str) -> None: """Allows you to input auth information after instantiating the client."""