Skip to content

Commit be7b0d7

Browse files
style(pre-commit): auto fixes from pre-commit.com hooks
1 parent 17eb534 commit be7b0d7

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

discord/commands/core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,9 @@ def _match_option_param_names(self, params, options):
920920
def _is_typing_union(self, annotation):
921921
return getattr(annotation, "__origin__", None) is Union or type(
922922
annotation
923-
) is getattr(types, "UnionType", Union) # type: ignore
923+
) is getattr(
924+
types, "UnionType", Union
925+
) # type: ignore
924926

925927
def _is_typing_optional(self, annotation):
926928
return self._is_typing_union(annotation) and type(None) in annotation.__args__ # type: ignore

discord/ext/commands/cooldowns.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@
2626
from __future__ import annotations
2727

2828
import asyncio
29-
import inspect
3029
import time
3130
from collections import deque
3231
from typing import TYPE_CHECKING, Any, Awaitable, Callable, Deque, TypeVar
3332

3433
import discord.abc
35-
from discord.enums import Enum
3634
from discord import utils
35+
from discord.enums import Enum
3736

3837
from ...abc import PrivateChannel
3938
from .errors import MaxConcurrencyReached

discord/ext/commands/core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,9 @@ def _is_typing_optional(self, annotation: T | T | None) -> TypeGuard[T | None]:
10861086
return (
10871087
getattr(annotation, "__origin__", None) is Union
10881088
or type(annotation) is getattr(types, "UnionType", Union)
1089-
) and type(None) in annotation.__args__ # type: ignore
1089+
) and type(
1090+
None
1091+
) in annotation.__args__ # type: ignore
10901092

10911093
@property
10921094
def signature(self) -> str:

0 commit comments

Comments
 (0)