diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4a794fc..1e8a285 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ # * Run "pre-commit install". repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-toml - id: check-yaml @@ -16,14 +16,14 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.9 + rev: v0.11.9 hooks: - id: ruff args: [--fix, --show-fixes] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.15.0 hooks: - id: mypy additional_dependencies: ["pytest"] diff --git a/src/asphalt/exceptions/__init__.py b/src/asphalt/exceptions/__init__.py index 73fae70..78db68e 100644 --- a/src/asphalt/exceptions/__init__.py +++ b/src/asphalt/exceptions/__init__.py @@ -6,7 +6,6 @@ from typing import Any from asphalt.core import Context, merge_config, qualified_name - from asphalt.exceptions.api import ExceptionReporter, ExtrasProvider __all__ = ("report_exception",) @@ -37,8 +36,7 @@ def report_exception( exception = sys.exc_info()[1] if not exception: raise ValueError( - 'missing "exception" parameter and no current exception present in ' - "sys.exc_info()" + 'missing "exception" parameter and no current exception present in sys.exc_info()' ) actual_logger: logging.Logger | None diff --git a/src/asphalt/exceptions/component.py b/src/asphalt/exceptions/component.py index 4accaff..3ba4220 100644 --- a/src/asphalt/exceptions/component.py +++ b/src/asphalt/exceptions/component.py @@ -13,7 +13,6 @@ merge_config, qualified_name, ) - from asphalt.exceptions import report_exception from asphalt.exceptions.api import ExceptionReporter diff --git a/src/asphalt/exceptions/reporters/raygun.py b/src/asphalt/exceptions/reporters/raygun.py index f557554..d326ad2 100644 --- a/src/asphalt/exceptions/reporters/raygun.py +++ b/src/asphalt/exceptions/reporters/raygun.py @@ -2,9 +2,9 @@ from typing import Any -from asphalt.core import Context from raygun4py.raygunprovider import RaygunSender +from asphalt.core import Context from asphalt.exceptions.api import ExceptionReporter diff --git a/src/asphalt/exceptions/reporters/sentry.py b/src/asphalt/exceptions/reporters/sentry.py index a8ed9dd..48b03a1 100644 --- a/src/asphalt/exceptions/reporters/sentry.py +++ b/src/asphalt/exceptions/reporters/sentry.py @@ -6,9 +6,9 @@ from typing import Any, Sequence import sentry_sdk -from asphalt.core import Context, resolve_reference from sentry_sdk.integrations import Integration +from asphalt.core import Context, resolve_reference from asphalt.exceptions.api import ExceptionReporter if sys.version_info >= (3, 10): diff --git a/tests/reporters/test_raygun.py b/tests/reporters/test_raygun.py index 2b0ac91..70ff6f2 100644 --- a/tests/reporters/test_raygun.py +++ b/tests/reporters/test_raygun.py @@ -2,8 +2,8 @@ from unittest.mock import patch import pytest -from asphalt.core import Context +from asphalt.core import Context from asphalt.exceptions.reporters.raygun import RaygunExceptionReporter diff --git a/tests/reporters/test_sentry.py b/tests/reporters/test_sentry.py index 08aa27e..c095b06 100644 --- a/tests/reporters/test_sentry.py +++ b/tests/reporters/test_sentry.py @@ -1,11 +1,11 @@ from unittest.mock import MagicMock import pytest -from asphalt.core import Context from pytest_mock import MockerFixture from sentry_sdk import Transport from sentry_sdk.integrations import Integration +from asphalt.core import Context from asphalt.exceptions.reporters.sentry import SentryExceptionReporter diff --git a/tests/test_component.py b/tests/test_component.py index 11f5e1c..89cd2d1 100644 --- a/tests/test_component.py +++ b/tests/test_component.py @@ -4,8 +4,8 @@ from collections import OrderedDict import pytest -from asphalt.core.context import Context +from asphalt.core.context import Context from asphalt.exceptions.api import ExceptionReporter from asphalt.exceptions.component import ExceptionReporterComponent diff --git a/tests/test_report_exception.py b/tests/test_report_exception.py index 472a04a..b521708 100644 --- a/tests/test_report_exception.py +++ b/tests/test_report_exception.py @@ -1,8 +1,8 @@ import logging import pytest -from asphalt.core import Context +from asphalt.core import Context from asphalt.exceptions import ExtrasProvider, report_exception from asphalt.exceptions.api import ExceptionReporter