mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-13 19:15:31 +00:00
fixed typeguard tests w/ burnettk
This commit is contained in:
parent
f35db3aa70
commit
c18eafa812
4
spiffworkflow-backend/poetry.lock
generated
4
spiffworkflow-backend/poetry.lock
generated
@ -1851,7 +1851,7 @@ lxml = "*"
|
|||||||
type = "git"
|
type = "git"
|
||||||
url = "https://github.com/sartography/SpiffWorkflow"
|
url = "https://github.com/sartography/SpiffWorkflow"
|
||||||
reference = "main"
|
reference = "main"
|
||||||
resolved_reference = "4195453a46638f23e87c3ffdb038717c2d8abd00"
|
resolved_reference = "5eed83ab12f67c01c7836424a22fc425a33fc55d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "SQLAlchemy"
|
name = "SQLAlchemy"
|
||||||
@ -2222,7 +2222,7 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "1.1"
|
lock-version = "1.1"
|
||||||
python-versions = ">=3.9,<3.12"
|
python-versions = ">=3.9,<3.12"
|
||||||
content-hash = "bbbd1c8bdce7f3dd7ec17c62b85dc7c95045fe500a759bb1a89c93add58a2a25"
|
content-hash = "832c1b6cd8d9aebc8529fdce11167bddcb3634fd0767dd2e490b74ababcf2714"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
alabaster = [
|
alabaster = [
|
||||||
|
@ -79,7 +79,7 @@ pytest = "*"
|
|||||||
coverage = {extras = ["toml"], version = "^6.1"}
|
coverage = {extras = ["toml"], version = "^6.1"}
|
||||||
safety = "^2.3.1"
|
safety = "^2.3.1"
|
||||||
mypy = ">=0.961"
|
mypy = ">=0.961"
|
||||||
typeguard = "^2.13.2"
|
typeguard = "^2"
|
||||||
xdoctest = {extras = ["colors"], version = "^1.0.1"}
|
xdoctest = {extras = ["colors"], version = "^1.0.1"}
|
||||||
sphinx = "^5.0.2"
|
sphinx = "^5.0.2"
|
||||||
sphinx-autobuild = ">=2021.3.14"
|
sphinx-autobuild = ">=2021.3.14"
|
||||||
|
@ -93,7 +93,8 @@ def process_model_delete(
|
|||||||
|
|
||||||
|
|
||||||
def process_model_update(
|
def process_model_update(
|
||||||
modified_process_model_identifier: str, body: Dict[str, Union[str, bool, int, None, list]]
|
modified_process_model_identifier: str,
|
||||||
|
body: Dict[str, Union[str, bool, int, None, list]],
|
||||||
) -> Any:
|
) -> Any:
|
||||||
"""Process_model_update."""
|
"""Process_model_update."""
|
||||||
process_model_identifier = modified_process_model_identifier.replace(":", "/")
|
process_model_identifier = modified_process_model_identifier.replace(":", "/")
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
"""APIs for dealing with process groups, process models, and process instances."""
|
"""APIs for dealing with process groups, process models, and process instances."""
|
||||||
import json
|
import json
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
from flask import g
|
from flask import g
|
||||||
from flask import jsonify
|
from flask import jsonify
|
||||||
@ -15,9 +14,10 @@ from spiffworkflow_backend.services.secret_service import SecretService
|
|||||||
from spiffworkflow_backend.services.user_service import UserService
|
from spiffworkflow_backend.services.user_service import UserService
|
||||||
|
|
||||||
|
|
||||||
def secret_show(key: str) -> Optional[str]:
|
def secret_show(key: str) -> Response:
|
||||||
"""Secret_show."""
|
"""Secret_show."""
|
||||||
return SecretService.get_secret(key)
|
secret = SecretService.get_secret(key)
|
||||||
|
return make_response(jsonify(secret), 200)
|
||||||
|
|
||||||
|
|
||||||
def secret_list(
|
def secret_list(
|
||||||
|
@ -3,10 +3,11 @@ import re
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
from typing import Type
|
||||||
|
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
from flask_bpmn.api.api_error import ApiError
|
from flask_bpmn.api.api_error import ApiError
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
from sqlalchemy import and_
|
from sqlalchemy import and_
|
||||||
from sqlalchemy import func
|
from sqlalchemy import func
|
||||||
from sqlalchemy import or_
|
from sqlalchemy import or_
|
||||||
@ -113,16 +114,16 @@ class ProcessInstanceReportService:
|
|||||||
{"Header": "status", "accessor": "status"},
|
{"Header": "status", "accessor": "status"},
|
||||||
],
|
],
|
||||||
"filter_by": [
|
"filter_by": [
|
||||||
{"field_name": "initiated_by_me", "field_value": True},
|
{"field_name": "initiated_by_me", "field_value": "true"},
|
||||||
{"field_name": "has_terminal_status", "field_value": True},
|
{"field_name": "has_terminal_status", "field_value": "true"},
|
||||||
],
|
],
|
||||||
"order_by": ["-start_in_seconds", "-id"],
|
"order_by": ["-start_in_seconds", "-id"],
|
||||||
},
|
},
|
||||||
"system_report_completed_instances_with_tasks_completed_by_me": {
|
"system_report_completed_instances_with_tasks_completed_by_me": {
|
||||||
"columns": cls.builtin_column_options(),
|
"columns": cls.builtin_column_options(),
|
||||||
"filter_by": [
|
"filter_by": [
|
||||||
{"field_name": "with_tasks_completed_by_me", "field_value": True},
|
{"field_name": "with_tasks_completed_by_me", "field_value": "true"},
|
||||||
{"field_name": "has_terminal_status", "field_value": True},
|
{"field_name": "has_terminal_status", "field_value": "true"},
|
||||||
],
|
],
|
||||||
"order_by": ["-start_in_seconds", "-id"],
|
"order_by": ["-start_in_seconds", "-id"],
|
||||||
},
|
},
|
||||||
@ -131,9 +132,9 @@ class ProcessInstanceReportService:
|
|||||||
"filter_by": [
|
"filter_by": [
|
||||||
{
|
{
|
||||||
"field_name": "with_tasks_assigned_to_my_group",
|
"field_name": "with_tasks_assigned_to_my_group",
|
||||||
"field_value": True,
|
"field_value": "true",
|
||||||
},
|
},
|
||||||
{"field_name": "has_terminal_status", "field_value": True},
|
{"field_name": "has_terminal_status", "field_value": "true"},
|
||||||
],
|
],
|
||||||
"order_by": ["-start_in_seconds", "-id"],
|
"order_by": ["-start_in_seconds", "-id"],
|
||||||
},
|
},
|
||||||
@ -319,7 +320,9 @@ class ProcessInstanceReportService:
|
|||||||
return results
|
return results
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_column_names_for_model(cls, model: db.Model) -> list[str]: # type: ignore
|
def get_column_names_for_model(
|
||||||
|
cls, model: Type[SpiffworkflowBaseDBModel]
|
||||||
|
) -> list[str]:
|
||||||
"""Get_column_names_for_model."""
|
"""Get_column_names_for_model."""
|
||||||
return [i.name for i in model.__table__.columns]
|
return [i.name for i in model.__table__.columns]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user