run precommit
This commit is contained in:
parent
3bc11edaf9
commit
cfa738f128
|
@ -1,7 +1,10 @@
|
|||
"""Email_service."""
|
||||
from typing import List
|
||||
from typing import Optional
|
||||
|
||||
from flask import current_app
|
||||
from flask_mail import Message # type: ignore
|
||||
from typing import List, Optional
|
||||
|
||||
|
||||
class EmailService:
|
||||
"""Provides common interface for working with an Email."""
|
||||
|
@ -13,11 +16,11 @@ class EmailService:
|
|||
recipients: List[str],
|
||||
content: str,
|
||||
content_html: str,
|
||||
cc: Optional[str]=None,
|
||||
bcc: Optional[str]=None,
|
||||
reply_to: Optional[str]=None,
|
||||
attachment_files: Optional[dict]=None,
|
||||
) ->None:
|
||||
cc: Optional[str] = None,
|
||||
bcc: Optional[str] = None,
|
||||
reply_to: Optional[str] = None,
|
||||
attachment_files: Optional[dict] = None,
|
||||
) -> None:
|
||||
"""We will receive all data related to an email and send it."""
|
||||
mail = current_app.config["MAIL_APP"]
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"""Error_handling_service."""
|
||||
from typing import Any, List, Union
|
||||
from typing import Any
|
||||
from typing import List
|
||||
from typing import Union
|
||||
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
from flask_bpmn.models.db import db
|
||||
|
@ -64,7 +66,11 @@ class ErrorHandlingService:
|
|||
...
|
||||
|
||||
@staticmethod
|
||||
def handle_email_notification(processor: ProcessInstanceProcessor, error: Union[ApiError, Exception], recipients: List) ->None:
|
||||
def handle_email_notification(
|
||||
processor: ProcessInstanceProcessor,
|
||||
error: Union[ApiError, Exception],
|
||||
recipients: List,
|
||||
) -> None:
|
||||
"""EmailHandler."""
|
||||
subject = "Unexpected error in app"
|
||||
if isinstance(error, ApiError):
|
||||
|
|
|
@ -821,7 +821,9 @@ def test_process_instance_report_with_default_list(
|
|||
assert process_instance_dict["status"] == "not_started"
|
||||
|
||||
|
||||
def setup_testing_instance(client: FlaskClient, process_group_id: str, process_model_id: str, user: UserModel) -> Any:
|
||||
def setup_testing_instance(
|
||||
client: FlaskClient, process_group_id: str, process_model_id: str, user: UserModel
|
||||
) -> Any:
|
||||
"""Setup_testing_instance."""
|
||||
headers = logged_in_headers(user)
|
||||
response = create_process_instance(
|
||||
|
|
Loading…
Reference in New Issue