From 1c8709ff9179fe96ef321211a044f50d46335709 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Fri, 30 Aug 2024 15:46:38 -0400 Subject: [PATCH] chore(cli): add docstring for new helper + wrap line --- bento_authorization_service/cli.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bento_authorization_service/cli.py b/bento_authorization_service/cli.py index 101de6a..fbeb0cc 100644 --- a/bento_authorization_service/cli.py +++ b/bento_authorization_service/cli.py @@ -29,6 +29,9 @@ def grant_created_exit(g: int | None) -> Literal[0, 1]: + """ + Helper function to exit with a different message/error code depending on whether the grant was successfully created. + """ if g is not None: print(f"Grant successfully created: {g}") return 0 @@ -209,7 +212,10 @@ async def public_data_access_cmd(_config: Config, db: Database, args) -> int: resource=RESOURCE_EVERYTHING, permissions=permissions, expiry=None, - notes=f"Generated by the bento_authz CLI tool as a result of `bento_authz public-data-access {level} ...`", + notes=( + f"Generated by the bento_authz CLI tool as a result of `bento_authz public-data-access {level} ..." + f"`", + ), ) ) )