Skip to content

Commit

Permalink
apply black formatting to rebased files
Browse files Browse the repository at this point in the history
Signed-off-by: Golda Velez <[email protected]>
  • Loading branch information
gvelez17 committed Mar 8, 2024
1 parent d5bc4fe commit 4b74a94
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
4 changes: 3 additions & 1 deletion aries_cloudagent/indy/models/cred_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,5 +308,7 @@ class Meta:
)

credential = fields.Nested(
CredentialSchema(), required=True, metadata={"description": "", "example": ""}
CredentialSchema(),
required=True,
metadata={"description": "", "example": ""},
)
4 changes: 3 additions & 1 deletion aries_cloudagent/indy/models/cred_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""}
)
34 changes: 26 additions & 8 deletions demo/runners/agent_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"]
Expand Down Expand Up @@ -1304,7 +1320,9 @@ def arg_parser(ident: str = None, port: int = 8020):
metavar=("<api>"),
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"
)
Expand Down

0 comments on commit 4b74a94

Please sign in to comment.