some more mypy issues

This commit is contained in:
jasquat 2022-07-25 15:07:32 -04:00
parent f6ba35c02e
commit e34d1f83a2
2 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,6 @@
"""Task."""
import enum
from typing import Any
from typing import Any, Union
import marshmallow
from marshmallow import Schema
@ -101,18 +101,18 @@ class Task:
title: str,
type: str,
state: str,
lane: str | None = None,
lane: Union[str, None] = None,
form: None = None,
documentation: str = "",
data: dict[str, Any] | None = None,
multi_instance_type: MultiInstanceType | None = None,
multi_instance_type: Union[MultiInstanceType, None] = None,
multi_instance_count: str = "",
multi_instance_index: str = "",
process_name: str = "",
properties: dict | None = None,
process_instance_id: int | None = None,
form_schema: str | None = None,
form_ui_schema: str | None = None,
properties: Union[dict, None] = None,
process_instance_id: Union[int, None] = None,
form_schema: Union[str, None] = None,
form_ui_schema: Union[str, None] = None,
):
"""__init__."""
self.id = id

View File

@ -793,7 +793,7 @@ def get_value_from_array_with_index(array: list, index: int) -> Any:
def prepare_form_data(
form_file: str, task_data: dict | None, process_model: ProcessModelInfo
form_file: str, task_data: Union[dict, None], process_model: ProcessModelInfo
) -> str:
"""Prepare_form_data."""
if task_data is None:
@ -812,7 +812,7 @@ def prepare_form_data(
def get_spiff_task_from_process_instance(
task_id: str,
process_instance: ProcessInstanceModel,
processor: ProcessInstanceProcessor | None = None,
processor: Union[ProcessInstanceProcessor, None] = None,
) -> SpiffTask:
"""Get_spiff_task_from_process_instance."""
if processor is None: