Skip to content

Commit 56040b6

Browse files
committed
lint
Signed-off-by: Alina Buzachis <[email protected]>
1 parent cdf74f5 commit 56040b6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

core/task_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ def run_pattern_task(pattern_id: int, task_id: int) -> None:
5959
logger.error(f"Could not find pattern definition for task {task_id}")
6060
task.mark_failed({"error": "Pattern definition not found."})
6161
except Exception as e:
62-
logger.error(f"Task {task_id} failed: {e}")
63-
task.mark_failed({"error": str(e)})
62+
error_message = f"An unexpected error occurred {str(e)}."
63+
logger.exception(f"Task {task_id} failed unexpectedly.")
64+
task.mark_failed({"error": error_message})
6465

6566

6667
def run_pattern_instance_task(instance_id: int, task_id: int) -> None:

core/utils/controller/client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
import logging
33
import urllib.parse
44
from typing import Any
5-
from typing import Callable
65
from typing import Dict
76
from typing import Optional
87
from typing import Sequence
9-
from typing import TypeVar
108

119
import requests
1210
from django.conf import settings

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ strict = true
7575
disallow_any_generics = false
7676
disallow_subclassing_any = false
7777
disallow_untyped_decorators = false
78+
disable_error_code = ["no-any-return"]
7879

7980
[[tool.mypy.overrides]]
8081
module = ["ansible_base.*", "dotenv.*", "dispatcherd.*", "dynaconf.*"]

0 commit comments

Comments
 (0)