mirror of
				https://github.com/RGBCube/GitHubWrapper
				synced 2025-10-31 14:02:46 +00:00 
			
		
		
		
	fix some repr and change File import
This commit is contained in:
		
							parent
							
								
									104203fb3f
								
							
						
					
					
						commit
						428b7e97ed
					
				
					 2 changed files with 4 additions and 8 deletions
				
			
		|  | @ -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__ = ( | ||||
|  |  | |||
|  | @ -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.""" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 VarMonke
						VarMonke