From ecf626c54fe26bbaec13913cbf1d72ef20a6bec5 Mon Sep 17 00:00:00 2001 From: ff137 Date: Mon, 16 Sep 2024 12:37:22 +0300 Subject: [PATCH] :art: add optional typing to List[...] = None parameters Signed-off-by: ff137 --- aries_cloudagent/ledger/base.py | 4 ++-- aries_cloudagent/ledger/indy_vdr.py | 2 +- aries_cloudagent/wallet/askar.py | 2 +- aries_cloudagent/wallet/base.py | 2 +- aries_cloudagent/wallet/routes.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aries_cloudagent/ledger/base.py b/aries_cloudagent/ledger/base.py index bba161ef24..caaff97192 100644 --- a/aries_cloudagent/ledger/base.py +++ b/aries_cloudagent/ledger/base.py @@ -86,7 +86,7 @@ async def _construct_attr_json( endpoint: str, endpoint_type: Optional[EndpointType] = None, all_exist_endpoints: Optional[dict] = None, - routing_keys: List[str] = None, + routing_keys: Optional[List[str]] = None, ) -> str: """Create attr_json string. @@ -120,7 +120,7 @@ async def update_endpoint_for_did( endpoint_type: EndpointType = EndpointType.ENDPOINT, write_ledger: bool = True, endorser_did: Optional[str] = None, - routing_keys: List[str] = None, + routing_keys: Optional[List[str]] = None, ) -> bool: """Check and update the endpoint on the ledger. diff --git a/aries_cloudagent/ledger/indy_vdr.py b/aries_cloudagent/ledger/indy_vdr.py index 2d169524dc..81bc44e892 100644 --- a/aries_cloudagent/ledger/indy_vdr.py +++ b/aries_cloudagent/ledger/indy_vdr.py @@ -712,7 +712,7 @@ async def update_endpoint_for_did( endpoint_type: Optional[EndpointType] = None, write_ledger: bool = True, endorser_did: Optional[str] = None, - routing_keys: List[str] = None, + routing_keys: Optional[List[str]] = None, ) -> bool: """Check and update the endpoint on the ledger. diff --git a/aries_cloudagent/wallet/askar.py b/aries_cloudagent/wallet/askar.py index f648df36b7..efea7120bb 100644 --- a/aries_cloudagent/wallet/askar.py +++ b/aries_cloudagent/wallet/askar.py @@ -554,7 +554,7 @@ async def set_did_endpoint( endpoint_type: Optional[EndpointType] = None, write_ledger: bool = True, endorser_did: Optional[str] = None, - routing_keys: List[str] = None, + routing_keys: Optional[List[str]] = None, ): """Update the endpoint for a DID in the wallet, send to ledger if posted. diff --git a/aries_cloudagent/wallet/base.py b/aries_cloudagent/wallet/base.py index dac45d301e..2f883fd2ea 100644 --- a/aries_cloudagent/wallet/base.py +++ b/aries_cloudagent/wallet/base.py @@ -295,7 +295,7 @@ async def set_did_endpoint( endpoint_type: Optional[EndpointType] = None, write_ledger: bool = True, endorser_did: Optional[str] = None, - routing_keys: List[str] = None, + routing_keys: Optional[List[str]] = None, ): """Update the endpoint for a DID in the wallet, send to ledger if posted. diff --git a/aries_cloudagent/wallet/routes.py b/aries_cloudagent/wallet/routes.py index fe202fb793..9e2045dc95 100644 --- a/aries_cloudagent/wallet/routes.py +++ b/aries_cloudagent/wallet/routes.py @@ -802,7 +802,7 @@ async def promote_wallet_public_did( write_ledger: bool = False, profile: Optional[Profile] = None, connection_id: Optional[str] = None, - routing_keys: List[str] = None, + routing_keys: Optional[List[str]] = None, mediator_endpoint: Optional[str] = None, ) -> Tuple[DIDInfo, Optional[dict]]: """Promote supplied DID to the wallet public DID."""