Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 14, 2023
1 parent 1e23f4e commit d921157
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down
5 changes: 4 additions & 1 deletion docs/code/polling/with_aiogram_non_blocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 0 additions & 3 deletions glQiwiApi/utils/deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_event_fetching/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d921157

Please sign in to comment.