From bc9d820e1d4fb2e114a90997570e31b44bebf3de Mon Sep 17 00:00:00 2001 From: jasquat Date: Fri, 23 Sep 2022 10:01:22 -0400 Subject: [PATCH] python 3.9 does not like the pipe style optional arg types --- src/spiffworkflow_backend/routes/process_api_blueprint.py | 2 +- src/spiffworkflow_backend/services/secret_service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spiffworkflow_backend/routes/process_api_blueprint.py b/src/spiffworkflow_backend/routes/process_api_blueprint.py index 65816cd5..ae0c31aa 100644 --- a/src/spiffworkflow_backend/routes/process_api_blueprint.py +++ b/src/spiffworkflow_backend/routes/process_api_blueprint.py @@ -1088,7 +1088,7 @@ def get_spiff_task_from_process_instance( # # Methods for secrets CRUD - maybe move somewhere else: # -def get_secret(key: str) -> str | None: +def get_secret(key: str) -> Optional[str]: """Get_secret.""" return SecretService.get_secret(key) diff --git a/src/spiffworkflow_backend/services/secret_service.py b/src/spiffworkflow_backend/services/secret_service.py index 9321ea52..de215a1c 100644 --- a/src/spiffworkflow_backend/services/secret_service.py +++ b/src/spiffworkflow_backend/services/secret_service.py @@ -54,7 +54,7 @@ class SecretService: return secret_model @staticmethod - def get_secret(key: str) -> str | None: + def get_secret(key: str) -> Optional[str]: """Get_secret.""" secret: SecretModel = ( db.session.query(SecretModel).filter(SecretModel.key == key).first()