From 429ac3a7d8d01e20d226b95b82e366f570405ca3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 07:46:28 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 2 +- glQiwiApi/utils/deprecated.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fcf33ab3..afc195e9 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.3.0 + rev: 22.12.0 hooks: - id: black files: &files '^(glQiwiApi|tests|examples|benchmarks|docs)' 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