From 4bb37bc51e10a50a3887ab71aa1345bfb8f1e683 Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Fri, 11 Nov 2022 08:18:11 -0500 Subject: [PATCH] mypy fixes --- .../src/spiffworkflow_backend/routes/process_api_blueprint.py | 2 +- .../spiffworkflow_backend/services/process_model_service.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py index e043172f..260da378 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py @@ -178,7 +178,7 @@ def process_group_update( return make_response(jsonify(process_group), 200) -def process_groups_list(process_group_identifier: str = None, page: int = 1, per_page: int = 100) -> flask.wrappers.Response: +def process_groups_list(process_group_identifier: Optional[str] = None, page: int = 1, per_page: int = 100) -> flask.wrappers.Response: """Process_groups_list.""" if process_group_identifier is not None: process_groups = ProcessModelService().get_process_groups(process_group_identifier) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_model_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_model_service.py index 1b7d4c94..1aa0e9eb 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_model_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_model_service.py @@ -160,7 +160,7 @@ class ProcessModelService(FileSystemService): process_models.sort() return process_models - def get_process_groups(self, process_group_id: str = None) -> list[ProcessGroup]: + def get_process_groups(self, process_group_id: Optional[str] = None) -> list[ProcessGroup]: """Returns the process_groups as a list in display order.""" process_groups = self.__scan_process_groups(process_group_id) process_groups.sort() @@ -254,7 +254,7 @@ class ProcessModelService(FileSystemService): index += 1 return process_groups - def __scan_process_groups(self, process_group_id: str = None) -> list[ProcessGroup]: + def __scan_process_groups(self, process_group_id: Optional[str] = None) -> list[ProcessGroup]: """__scan_process_groups.""" if not os.path.exists(FileSystemService.root_path()): return [] # Nothing to scan yet. There are no files.