1
Fork 0
mirror of https://github.com/RGBCube/GitHubWrapper synced 2025-05-17 14:35:09 +00:00

Actually fixed the http typehints

This commit is contained in:
sudosnok 2022-04-09 12:33:46 +01:00
parent d5a99bb0c4
commit 353977c4b2

View file

@ -49,7 +49,7 @@ class _BaseUser(APIObject):
'login', 'login',
'id', 'id',
) )
def __init__(self, response: dict, _http) -> None: def __init__(self, response: dict, _http: http) -> None:
super().__init__(response, _http) super().__init__(response, _http)
self._http = _http self._http = _http
self.login = response.get('login') self.login = response.get('login')
@ -83,7 +83,7 @@ class User(_BaseUser):
'following', 'following',
'created_at', 'created_at',
) )
def __init__(self, response: dict, _http) -> None: def __init__(self, response: dict, _http: http) -> None:
super().__init__(response, _http) super().__init__(response, _http)
tmp = self.__slots__ + _BaseUser.__slots__ tmp = self.__slots__ + _BaseUser.__slots__
keys = {key: value for key,value in self._response.items() if key in tmp} keys = {key: value for key,value in self._response.items() if key in tmp}
@ -106,7 +106,7 @@ class PartialUser(_BaseUser):
'avatar_url', 'avatar_url',
) + _BaseUser.__slots__ ) + _BaseUser.__slots__
def __init__(self, response: dict, _http) -> None: def __init__(self, response: dict, _http: http) -> None:
super().__init__(response, _http) super().__init__(response, _http)
self.site_admin = response.get('site_admin') self.site_admin = response.get('site_admin')
self.html_url = response.get('html_url') self.html_url = response.get('html_url')
@ -143,7 +143,7 @@ class Repository(APIObject):
'forks', 'forks',
'license', 'license',
) )
def __init__(self, response: dict, _http) -> None: def __init__(self, response: dict, _http: http) -> None:
super().__init__(response, _http) super().__init__(response, _http)
tmp = self.__slots__ + APIObject.__slots__ tmp = self.__slots__ + APIObject.__slots__
keys = {key: value for key,value in self._response.items() if key in tmp} keys = {key: value for key,value in self._response.items() if key in tmp}
@ -187,7 +187,7 @@ class Issue(APIObject):
'closed_by', 'closed_by',
) )
def __init__(self, response: dict, _http) -> None: def __init__(self, response: dict, _http: http) -> None:
super().__init__(response, _http) super().__init__(response, _http)
tmp = self.__slots__ + APIObject.__slots__ tmp = self.__slots__ + APIObject.__slots__
keys = {key: value for key,value in self._response.items() if key in tmp} keys = {key: value for key,value in self._response.items() if key in tmp}
@ -227,7 +227,7 @@ class Gist(APIObject):
'comments', 'comments',
'truncated', 'truncated',
) )
def __init__(self, response: dict, _http) -> None: def __init__(self, response: dict, _http: http) -> None:
super().__init__(response, _http) super().__init__(response, _http)
tmp = self.__slots__ + APIObject.__slots__ tmp = self.__slots__ + APIObject.__slots__
keys = {key: value for key,value in self._response.items() if key in tmp} keys = {key: value for key,value in self._response.items() if key in tmp}
@ -261,7 +261,7 @@ class Organization(APIObject):
'avatar_url', 'avatar_url',
) )
def __init__(self, response: dict, _http) -> None: def __init__(self, response: dict, _http: http) -> None:
super().__init__(response, _http) super().__init__(response, _http)
tmp = self.__slots__ + APIObject.__slots__ tmp = self.__slots__ + APIObject.__slots__
keys = {key: value for key,value in self._response.items() if key in tmp} keys = {key: value for key,value in self._response.items() if key in tmp}