mirror of
https://github.com/sartography/spiffworkflow-backend.git
synced 2025-02-24 13:28:31 +00:00
some mypy fixes w/ burnettk
This commit is contained in:
parent
1b84ef94ea
commit
f78a2b6997
@ -8,7 +8,8 @@ from flask_bpmn.models.group import FlaskBpmnGroupModel
|
|||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
pass
|
from spiffworkflow_backend.models.user_group_assignment import UserGroupAssignmentModel # noqa: F401
|
||||||
|
from spiffworkflow_backend.models.user import UserModel # noqa: F401
|
||||||
|
|
||||||
|
|
||||||
class GroupModel(FlaskBpmnGroupModel):
|
class GroupModel(FlaskBpmnGroupModel):
|
||||||
|
@ -14,7 +14,7 @@ from sqlalchemy import func
|
|||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel # noqa: F401
|
||||||
|
|
||||||
|
|
||||||
class TaskAction(enum.Enum):
|
class TaskAction(enum.Enum):
|
||||||
@ -71,7 +71,7 @@ class TaskEventModelSchema(SQLAlchemyAutoSchema):
|
|||||||
class TaskEvent:
|
class TaskEvent:
|
||||||
"""TaskEvent."""
|
"""TaskEvent."""
|
||||||
|
|
||||||
def __init__(self, model: TaskEventModel, process_instance: ProcessInstanceModel):
|
def __init__(self, model: TaskEventModel, process_instance: "ProcessInstanceModel"):
|
||||||
"""__init__."""
|
"""__init__."""
|
||||||
self.id = model.id
|
self.id = model.id
|
||||||
self.process_instance = process_instance
|
self.process_instance = process_instance
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
"""Error_handling_service."""
|
"""Error_handling_service."""
|
||||||
from flask_bpmn.api.api_error import ApiError
|
from flask_bpmn.api.api_error import ApiError
|
||||||
|
from spiffworkflow_backend.services.process_instance_processor import ProcessInstanceProcessor
|
||||||
|
|
||||||
|
|
||||||
class ErrorHandlingService:
|
class ErrorHandlingService:
|
||||||
"""ErrorHandlingService."""
|
"""ErrorHandlingService."""
|
||||||
|
|
||||||
def handle_error(self, processor, error):
|
def handle_error(self, processor: ProcessInstanceProcessor, error: ApiError) -> None:
|
||||||
"""Handle_error."""
|
"""Handle_error."""
|
||||||
print("handle_error")
|
print("handle_error")
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Test_file."""
|
"""Test_file."""
|
||||||
|
from datetime import datetime
|
||||||
from spiffworkflow_backend.models.file import File
|
from spiffworkflow_backend.models.file import File
|
||||||
|
|
||||||
|
|
||||||
@ -20,6 +21,6 @@ def create_test_file(type: str, name: str) -> File:
|
|||||||
name=name,
|
name=name,
|
||||||
content_type=type,
|
content_type=type,
|
||||||
document={},
|
document={},
|
||||||
last_modified="Tuesday",
|
last_modified=datetime.now(),
|
||||||
size=1,
|
size=1,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user