Skip to content

Commit

Permalink
fix(core): get_accounts typing
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Nov 5, 2024
1 parent 70fea5e commit e235bab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions avilla/core/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,20 +229,20 @@ def get_accounts(self, *, pattern: str) -> list[AccountInfo]:
...

@overload
def get_accounts(self, *, protocol_type: type[BaseProtocol]) -> list[AccountInfo]:
def get_accounts(self, *, protocol_type: type[BaseProtocol] | tuple[type[BaseProtocol], ...]) -> list[AccountInfo]:
...

@overload
def get_accounts(self, *, account_type: type[BaseAccount]) -> list[AccountInfo]:
def get_accounts(self, *, account_type: type[BaseAccount] | tuple[type[BaseAccount], ...]) -> list[AccountInfo]:
...

def get_accounts(
self,
*,
land: str | None = None,
pattern: str | None = None,
protocol_type: type[BaseProtocol] | None = None,
account_type: type[BaseAccount] | None = None,
protocol_type: type[BaseProtocol] | tuple[type[BaseProtocol], ...] | None = None,
account_type: type[BaseAccount] | tuple[type[BaseAccount], ...] | None = None,
) -> list[AccountInfo]:
if land:
return [account for account in self.accounts.values() if account.platform.land.name == land]
Expand Down

0 comments on commit e235bab

Please sign in to comment.