From 24f803921ebc873dbc52959c433d882f6660cedf Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Wed, 8 Feb 2023 12:00:01 +0200 Subject: [PATCH] refactor: rename variables --- client_manager.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client_manager.py b/client_manager.py index bd3f279..736e4ce 100644 --- a/client_manager.py +++ b/client_manager.py @@ -21,17 +21,15 @@ class NostrClientManager: self._active_relays: dict = {} self._is_ready = False - async def add_client(self, client: "NostrClientConnection") -> bool: + async def add_client(self, c: "NostrClientConnection") -> bool: if not self._is_ready: await self.init_relays() - allow_connect = await self._allow_client(client) - if not allow_connect: + if not (await self._allow_client(c)): return False - self._set_client_callbacks(client) - - self.clients(client.relay_id).append(client) + self._set_client_callbacks(c) + self.clients(c.relay_id).append(c) return True