precommit is passing w/ burnettk

This commit is contained in:
jasquat 2022-06-21 14:52:01 -04:00
parent 069a00df79
commit 5100b40405
29 changed files with 33 additions and 38 deletions

View File

@ -1,6 +1,7 @@
"""Grabs tickets from csv and makes process instances."""
import csv
import os
from flask_bpmn.models.db import db
from spiffworkflow_backend import create_app

View File

@ -1,5 +1,6 @@
"""Import tickets, for use in script task."""
import csv
from flask_bpmn.models.db import db
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel

View File

@ -1,11 +1,11 @@
"""__init__."""
import os
from flask_bpmn.api.api_error import api_error_blueprint
from flask_bpmn.models.db import db
from flask_bpmn.models.db import migrate
import connexion # type: ignore
import flask.app
from flask_bpmn.api.api_error import api_error_blueprint
from flask_bpmn.models.db import db
from flask_bpmn.models.db import migrate
from flask_cors import CORS # type: ignore
import spiffworkflow_backend.load_database_models # noqa: F401

View File

@ -1,7 +1,6 @@
"""Data_store."""
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from flask_marshmallow.sqla import SQLAlchemyAutoSchema # type: ignore

View File

@ -2,10 +2,10 @@
import enum
from dataclasses import dataclass
from dataclasses import field
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from typing import Optional
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from marshmallow import INCLUDE
from marshmallow import Schema
from sqlalchemy.orm import deferred

View File

@ -1,7 +1,6 @@
"""Group."""
from flask_bpmn.models.db import db
from flask_bpmn.models.group import FlaskBpmnGroupModel
from sqlalchemy.orm import relationship

View File

@ -1,8 +1,8 @@
"""PermissionAssignment."""
import enum
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from sqlalchemy import Enum
from sqlalchemy import ForeignKey

View File

@ -1,7 +1,6 @@
"""PermissionTarget."""
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from sqlalchemy.schema import CheckConstraint
# from sqlalchemy import ForeignKey # type: ignore

View File

@ -1,7 +1,6 @@
"""Principal."""
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from sqlalchemy import ForeignKey
from sqlalchemy.schema import CheckConstraint

View File

@ -1,9 +1,9 @@
"""Process_instance."""
import enum
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
import marshmallow
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from marshmallow import INCLUDE
from marshmallow import Schema
from marshmallow_enum import EnumField # type: ignore

View File

@ -1,7 +1,6 @@
"""Process_instance."""
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from sqlalchemy import ForeignKey
from sqlalchemy.orm import deferred
from sqlalchemy.orm import relationship

View File

@ -2,9 +2,9 @@
from __future__ import annotations
import enum
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from marshmallow import fields
from marshmallow import INCLUDE
from marshmallow import Schema

View File

@ -1,12 +1,12 @@
"""User."""
from flask_bpmn.api.api_error import ApiError
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from typing import Optional
import jwt
import marshmallow
from flask import current_app
from flask_bpmn.api.api_error import ApiError
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from marshmallow import Schema
from sqlalchemy.orm import relationship

View File

@ -1,7 +1,6 @@
"""UserGroupAssignment."""
from flask_bpmn.models.db import db
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
from sqlalchemy import ForeignKey
from sqlalchemy.orm import relationship

View File

@ -1,5 +1,4 @@
"""APIs for dealing with process groups, process models, and process instances."""
from flask_bpmn.models.db import db
from typing import Any
from flask import Blueprint
@ -9,6 +8,7 @@ from flask import redirect
from flask import render_template
from flask import request
from flask import url_for
from flask_bpmn.models.db import db
from spiffworkflow_backend.models.user import UserModel
from spiffworkflow_backend.services.process_instance_processor import (

View File

@ -1,12 +1,12 @@
"""APIs for dealing with process groups, process models, and process instances."""
import json
from flask_bpmn.api.api_error import ApiError
from flask_bpmn.models.db import db
import connexion # type: ignore
from flask import Blueprint
from flask import g
from flask import Response
from flask_bpmn.api.api_error import ApiError
from flask_bpmn.models.db import db
from spiffworkflow_backend.models.file import FileSchema
from spiffworkflow_backend.models.file import FileType

View File

@ -1,8 +1,7 @@
"""User."""
from flask_bpmn.api.api_error import ApiError
from flask import current_app
from flask import g
from flask_bpmn.api.api_error import ApiError
from spiffworkflow_backend.models.user import UserModel

View File

@ -1,7 +1,5 @@
"""Main."""
import json
from flask_bpmn.api.api_error import ApiError
from flask_bpmn.models.db import db
from typing import Any
from typing import Final
@ -9,6 +7,8 @@ import flask.wrappers
from flask import Blueprint
from flask import request
from flask import Response
from flask_bpmn.api.api_error import ApiError
from flask_bpmn.models.db import db
from sqlalchemy.exc import IntegrityError
from spiffworkflow_backend.models.group import GroupModel

View File

@ -2,6 +2,7 @@
import importlib
import os
import pkgutil
from flask_bpmn.api.api_error import ApiError

View File

@ -1,11 +1,11 @@
"""File_system_service."""
import os
from datetime import datetime
from flask_bpmn.api.api_error import ApiError
from typing import List
import pytz
from flask import current_app
from flask_bpmn.api.api_error import ApiError
from spiffworkflow_backend.models.file import CONTENT_TYPES
from spiffworkflow_backend.models.file import File

View File

@ -1,11 +1,11 @@
"""Process_instance_processor."""
import json
import time
from flask_bpmn.api.api_error import ApiError
from flask_bpmn.models.db import db
from typing import List
from flask import current_app
from flask_bpmn.api.api_error import ApiError
from flask_bpmn.models.db import db
from lxml import etree # type: ignore
from SpiffWorkflow import Task as SpiffTask # type: ignore
from SpiffWorkflow import TaskState

View File

@ -1,9 +1,9 @@
"""Process_instance_service."""
import time
from flask_bpmn.models.db import db
from typing import List
from flask import current_app
from flask_bpmn.models.db import db
from SpiffWorkflow import NavItem # type: ignore
from SpiffWorkflow.bpmn.specs.ManualTask import ManualTask # type: ignore
from SpiffWorkflow.bpmn.specs.UserTask import UserTask # type: ignore

View File

@ -2,9 +2,10 @@
import json
import os
import shutil
from flask_bpmn.api.api_error import ApiError
from typing import List
from flask_bpmn.api.api_error import ApiError
from spiffworkflow_backend.models.process_group import ProcessGroup
from spiffworkflow_backend.models.process_group import ProcessGroupSchema
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel

View File

@ -2,10 +2,10 @@
import os
import shutil
from datetime import datetime
from flask_bpmn.api.api_error import ApiError
from typing import List
from typing import Union
from flask_bpmn.api.api_error import ApiError
from lxml import etree # type: ignore
from lxml.etree import Element as EtreeElement # type: ignore
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException # type: ignore

View File

@ -1,9 +1,8 @@
"""User_service."""
from flask import g
from flask_bpmn.api.api_error import ApiError
from flask_bpmn.models.db import db
from flask import g
from spiffworkflow_backend.models.user import AdminSessionModel
from spiffworkflow_backend.models.user import UserModel

View File

@ -1,11 +1,11 @@
"""Spiff Workflow Connector."""
from flask_bpmn.models.db import db
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
from flask_bpmn.models.db import db
from SpiffWorkflow.bpmn.serializer.workflow import BpmnWorkflowSerializer # type: ignore
from SpiffWorkflow.bpmn.specs.events.event_types import CatchingEvent # type: ignore
from SpiffWorkflow.bpmn.specs.events.event_types import ThrowingEvent

View File

@ -1,10 +1,10 @@
"""User."""
from flask_bpmn.models.db import db
from typing import Any
from typing import Dict
from typing import Optional
from flask.app import Flask
from flask_bpmn.models.db import db
from tests.spiffworkflow_backend.helpers.example_data import ExampleDataLoader
from spiffworkflow_backend.models.process_group import ProcessGroup

View File

@ -3,7 +3,6 @@ import io
import json
import os
import shutil
from flask_bpmn.models.db import db
from typing import Dict
from typing import Iterator
from typing import Optional
@ -12,6 +11,7 @@ from typing import Union
import pytest
from flask.app import Flask
from flask.testing import FlaskClient
from flask_bpmn.models.db import db
from tests.spiffworkflow_backend.helpers.test_data import find_or_create_user
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
from tests.spiffworkflow_backend.helpers.test_data import logged_in_headers

View File

@ -1,7 +1,6 @@
"""Test Permissions."""
from flask_bpmn.models.db import db
from flask.app import Flask
from flask_bpmn.models.db import db
from tests.spiffworkflow_backend.helpers.test_data import find_or_create_user
from spiffworkflow_backend.models.principal import PrincipalModel