mypy fixes
This commit is contained in:
parent
1a6da88504
commit
4bb37bc51e
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue