Skip to content

Commit

Permalink
feat: fixes to typing
Browse files Browse the repository at this point in the history
  • Loading branch information
JurgenR committed Jan 1, 2025
1 parent cfe80ec commit 257fcd5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/aioslsk/user/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
AdminMessageEvent,
BlockListChangedEvent,
ConnectionStateChangedEvent,
Event,
EventBus,
FriendListChangedEvent,
KickedEvent,
Expand Down Expand Up @@ -135,7 +136,11 @@ async def start(self):
self._management_task.start()

async def stop(self) -> list[asyncio.Task]:
return [self._management_task.cancel()]
cancel_tasks = []
if task := self._management_task.cancel():
cancel_tasks.append(task)

return cancel_tasks

def get_self(self) -> User:
"""Returns the user object for the current session"""
Expand Down Expand Up @@ -277,7 +282,7 @@ def _unset_tracking_flag(self, user: User, flag: TrackingFlag) -> bool:
return tracked_user.flags != TrackingFlag(0)

async def _management_job(self, context: UserManagementContext):
events = []
events: list[Event] = []

if context.friends != self._settings.users.friends:
events.append(
Expand Down

0 comments on commit 257fcd5

Please sign in to comment.