mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-16 22:15:09 +00:00
Change self to cls for classmethod
This commit is contained in:
parent
fa79b7ef9d
commit
e1ba7aa586
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ class User(_BaseUser):
|
||||||
return f'<User; login: {self.login}, id: {self.id}, created_at: {repr_dt(self.created_at)}>'
|
return f'<User; login: {self.login}, id: {self.id}, created_at: {repr_dt(self.created_at)}>'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
async def get_user(self, session: aiohttp.ClientSession, username: str) -> 'User':
|
async def get_user(cls, session: aiohttp.ClientSession, username: str) -> 'User':
|
||||||
"""Returns a User object from the username, with the mentions slots."""
|
"""Returns a User object from the username, with the mentions slots."""
|
||||||
response = await http.get_user(session, username)
|
response = await http.get_user(session, username)
|
||||||
return User(response, session)
|
return User(response, session)
|
Loading…
Add table
Add a link
Reference in a new issue