From 81967f42b101b305f4405c6ef441f32e46ba889d 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 e043172fd..260da3788 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 1b7d4c94f..1aa0e9eb7 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.