diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 570d22e6..d904a11f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: "check-toml" - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 22.10.0 hooks: - id: black files: &files '^(glQiwiApi|tests|examples|benchmarks|docs)' diff --git a/docs/code/polling/with_aiogram_non_blocking.py b/docs/code/polling/with_aiogram_non_blocking.py index 6af17f65..0edf4a22 100644 --- a/docs/code/polling/with_aiogram_non_blocking.py +++ b/docs/code/polling/with_aiogram_non_blocking.py @@ -4,7 +4,10 @@ from glQiwiApi import QiwiWallet from glQiwiApi.core.event_fetching.dispatcher import QiwiDispatcher -from glQiwiApi.core.event_fetching.executor import HandlerContext, start_non_blocking_qiwi_api_polling +from glQiwiApi.core.event_fetching.executor import ( + HandlerContext, + start_non_blocking_qiwi_api_polling, +) from glQiwiApi.qiwi.clients.wallet.types import Transaction qiwi_dp = QiwiDispatcher() diff --git a/glQiwiApi/utils/deprecated.py b/glQiwiApi/utils/deprecated.py index 96f672c5..aaebdaa5 100644 --- a/glQiwiApi/utils/deprecated.py +++ b/glQiwiApi/utils/deprecated.py @@ -20,7 +20,6 @@ def deprecated(reason: Union[str, Callable[..., _F]], stacklevel: int = 2) -> De """ if isinstance(reason, str): - # The @deprecated is used with a 'reason'. # # .. code-block:: python @@ -30,7 +29,6 @@ def deprecated(reason: Union[str, Callable[..., _F]], stacklevel: int = 2) -> De # pass def decorator(func: Callable[..., _F]) -> Callable[..., _F]: - if inspect.isclass(func): msg = 'Call to deprecated class {name} ({reason}).' else: @@ -49,7 +47,6 @@ def wrapper(*args: Any, **kwargs: Any) -> _F: return decorator if inspect.isclass(reason) or inspect.isfunction(reason): - # The @deprecated is used without any 'reason'. # # .. code-block:: python diff --git a/tests/unit/test_event_fetching/test_executor.py b/tests/unit/test_event_fetching/test_executor.py index 12bc5803..60a8096e 100644 --- a/tests/unit/test_event_fetching/test_executor.py +++ b/tests/unit/test_event_fetching/test_executor.py @@ -8,8 +8,8 @@ from glQiwiApi import QiwiWallet from glQiwiApi.core.event_fetching.dispatcher import QiwiDispatcher from glQiwiApi.core.event_fetching.executor import ( - HandlerContext, ExecutorEvent, + HandlerContext, start_non_blocking_qiwi_api_polling, ) from glQiwiApi.qiwi.clients.wallet.types import History, Source, Transaction, TransactionType