Skip to content

Commit ccfb7d0

Browse files
committed
make it mergeable with the official repo
1 parent 69ffbf0 commit ccfb7d0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

coc/abc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ def share_link(self) -> str:
150150
class DataContainerMetaClass(type):
151151
def __repr__(cls):
152152
attrs = [
153-
("name", cls.name if 'name' in cls.__dict__ else "not initialized"),
154-
("id", cls.id if 'id' in cls.__dict__ else "not initialized"),
153+
("name", cls.name),
154+
("id", cls.id),
155155
]
156156
return "<%s %s>" % (cls.__name__, " ".join("%s=%r" % t for t in attrs),)
157157

coc/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ async def login(self, email: str, password: str) -> None:
270270
self._create_holders()
271271
LOG.debug("HTTP connection created. Client is ready for use.")
272272

273-
async def login_with_keys(self, *keys: str) -> None:
273+
def login_with_keys(self, *keys: str) -> None:
274274
"""Retrieves all keys and creates an HTTP connection ready for use.
275275
276276
Parameters
@@ -281,7 +281,7 @@ async def login_with_keys(self, *keys: str) -> None:
281281
http._keys = keys
282282
http.keys = cycle(http._keys)
283283
http.key_count = len(keys)
284-
await http.create_session(self.connector, self.timeout)
284+
self.loop.run_until_complete(http.create_session(self.connector, self.timeout))
285285
self._create_holders()
286286

287287
LOG.debug("HTTP connection created. Client is ready for use.")

coc/login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ def login_with_keys(*keys: str, client: Type[Union[Client, EventsClient]] = Clie
7878
Any kwargs you wish to pass into the Client object.
7979
"""
8080
instance = client(**kwargs)
81-
instance.loop.run_until_complete(instance.login_with_keys(*keys))
81+
instance.login_with_keys(*keys)
8282
return instance

0 commit comments

Comments
 (0)