From 8042f575563a890952d103eb78e3e1dee68c0425 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 12:18:20 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/deprecate/utils.py | 2 +- tests/collection_deprecate.py | 2 +- tests/test_classes.py | 2 +- tests/test_functions.py | 2 +- tests/test_utils.py | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/deprecate/utils.py b/src/deprecate/utils.py index 14a2426..6f057a5 100644 --- a/src/deprecate/utils.py +++ b/src/deprecate/utils.py @@ -5,7 +5,7 @@ import inspect import warnings from contextlib import contextmanager -from typing import Any, Generator, List, Optional, Type, Union, Callable, Tuple +from typing import Any, Callable, Generator, List, Optional, Tuple, Type, Union def get_func_arguments_types_defaults(func: Callable) -> List[Tuple[str, Tuple, Any]]: diff --git a/tests/collection_deprecate.py b/tests/collection_deprecate.py index 4577c47..c85e4ba 100644 --- a/tests/collection_deprecate.py +++ b/tests/collection_deprecate.py @@ -1,8 +1,8 @@ """Copyright (C) 2020-2023 Jiri Borovec <...>.""" +from deprecate import deprecated, void from sklearn.metrics import accuracy_score -from deprecate import deprecated, void from tests.collection_targets import base_pow_args, base_sum_kwargs _SHORT_MSG_FUNC = "`%(source_name)s` >> `%(target_name)s` in v%(deprecated_in)s rm v%(remove_in)s." diff --git a/tests/test_classes.py b/tests/test_classes.py index 4dab1c2..97e7fff 100644 --- a/tests/test_classes.py +++ b/tests/test_classes.py @@ -4,9 +4,9 @@ from warnings import warn import pytest - from deprecate.deprecation import deprecated from deprecate.utils import no_warning_call + from tests.collection_targets import NewCls _deprecation_warning = partial(warn, category=DeprecationWarning) diff --git a/tests/test_functions.py b/tests/test_functions.py index a09fec0..5dded1e 100644 --- a/tests/test_functions.py +++ b/tests/test_functions.py @@ -1,7 +1,7 @@ """Copyright (C) 2020-2023 Jiri Borovec <...>.""" import pytest - from deprecate.utils import no_warning_call + from tests.collection_deprecate import ( depr_accuracy_extra, depr_accuracy_map, diff --git a/tests/test_utils.py b/tests/test_utils.py index a14fec0..57c7de5 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -3,7 +3,6 @@ from warnings import warn import pytest - from deprecate.utils import no_warning_call