mypy fixes

This commit is contained in:
mike cullerton 2022-11-11 08:18:11 -05:00
parent 6a45604fa3
commit 81967f42b1
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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.