From 4b74a9440e70df49d8f2c4e2be6b9f3eae3d0ff3 Mon Sep 17 00:00:00 2001 From: Golda Velez Date: Fri, 8 Mar 2024 03:58:50 -0700 Subject: [PATCH] apply black formatting to rebased files Signed-off-by: Golda Velez --- aries_cloudagent/indy/models/cred_abstract.py | 4 ++- aries_cloudagent/indy/models/cred_request.py | 4 ++- demo/runners/agent_container.py | 34 ++++++++++++++----- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/aries_cloudagent/indy/models/cred_abstract.py b/aries_cloudagent/indy/models/cred_abstract.py index c5e46f233b..0b164e3aac 100644 --- a/aries_cloudagent/indy/models/cred_abstract.py +++ b/aries_cloudagent/indy/models/cred_abstract.py @@ -308,5 +308,7 @@ class Meta: ) credential = fields.Nested( - CredentialSchema(), required=True, metadata={"description": "", "example": ""} + CredentialSchema(), + required=True, + metadata={"description": "", "example": ""}, ) diff --git a/aries_cloudagent/indy/models/cred_request.py b/aries_cloudagent/indy/models/cred_request.py index 65849026f1..898f330ca6 100644 --- a/aries_cloudagent/indy/models/cred_request.py +++ b/aries_cloudagent/indy/models/cred_request.py @@ -181,4 +181,6 @@ class Meta: required=True, metadata={"description": "", "example": ""} ) - binding_proof = fields.str(required=True, metadata={"description": "", "example": ""}) + binding_proof = fields.str( + required=True, metadata={"description": "", "example": ""} + ) diff --git a/demo/runners/agent_container.py b/demo/runners/agent_container.py index f07f16b29d..4cf7faa98d 100644 --- a/demo/runners/agent_container.py +++ b/demo/runners/agent_container.py @@ -213,7 +213,9 @@ async def handle_issue_credential(self, message): cred_attrs = self.cred_attrs[message["credential_definition_id"]] cred_preview = { "@type": CRED_PREVIEW_TYPE, - "attributes": [{"name": n, "value": v} for (n, v) in cred_attrs.items()], + "attributes": [ + {"name": n, "value": v} for (n, v) in cred_attrs.items() + ], } try: cred_ex_rec = await self.admin_POST( @@ -420,7 +422,9 @@ async def handle_present_proof_v2_0(self, message): pres_request_indy = ( message["by_format"].get("pres_request", {}).get("indy") ) - pres_request_dif = message["by_format"].get("pres_request", {}).get("dif") + pres_request_dif = ( + message["by_format"].get("pres_request", {}).get("dif") + ) request = {} if not pres_request_dif and not pres_request_indy: @@ -597,7 +601,9 @@ async def generate_invitation( self._connection_ready = asyncio.Future() with log_timer("Generate invitation duration:"): # Generate an invitation - log_status("#7 Create a connection to alice and print out the invite details") + log_status( + "#7 Create a connection to alice and print out the invite details" + ) invi_rec = await self.get_invite( use_did_exchange, auto_accept=auto_accept, @@ -809,7 +815,9 @@ async def initialize( raise Exception("Endorser agent returns None :-(") # set the endorser invite so the agent can auto-connect - self.agent.endorser_invite = self.endorser_agent.endorser_multi_invitation_url + self.agent.endorser_invite = ( + self.endorser_agent.endorser_multi_invitation_url + ) self.agent.endorser_did = self.endorser_agent.endorser_public_did else: self.endorser_agent = None @@ -845,17 +853,25 @@ async def initialize( if self.mediation: # we need to pre-connect the agent to its mediator self.agent.log("Connect wallet to mediator ...") - if not await connect_wallet_to_mediator(self.agent, self.mediator_agent): + if not await connect_wallet_to_mediator( + self.agent, self.mediator_agent + ): raise Exception("Mediation setup FAILED :-(") if self.endorser_agent: self.agent.log("Connect wallet to endorser ...") - if not await connect_wallet_to_endorser(self.agent, self.endorser_agent): + if not await connect_wallet_to_endorser( + self.agent, self.endorser_agent + ): raise Exception("Endorser setup FAILED :-(") if self.taa_accept: await self.agent.taa_accept() # if we are an author, create our public DID here ... - if self.endorser_role and self.endorser_role == "author" and self.endorser_agent: + if ( + self.endorser_role + and self.endorser_role == "author" + and self.endorser_agent + ): if self.public_did and self.cred_type != CRED_FORMAT_JSON_LD: new_did = await self.agent.admin_POST("/wallet/did/create") self.agent.did = new_did["result"]["did"] @@ -1304,7 +1320,9 @@ def arg_parser(ident: str = None, port: int = 8020): metavar=(""), help="API level (10 or 20 (default))", ) - parser.add_argument("--timing", action="store_true", help="Enable timing information") + parser.add_argument( + "--timing", action="store_true", help="Enable timing information" + ) parser.add_argument( "--multitenant", action="store_true", help="Enable multitenancy options" )