Skip to content

Commit

Permalink
Update parsing.py
Browse files Browse the repository at this point in the history
  • Loading branch information
FasterSpeeding authored Sep 23, 2024
1 parent 24dd800 commit 89eb6a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tanjun/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,9 @@ def key(self) -> str:
return self._key

def _add_converter(self, converter: ConverterSig[typing.Any], /) -> None:
if self._client and isinstance(converter, conversion.BaseConverter):
if self._client and isinstance( # pyright: ignore[reportUnnecessaryIsInstance]
converter, conversion.BaseConverter
):
converter.check_client(self._client, f"{self._key} parameter")

# Some types like `bool` and `bytes` are overridden here for the sake of convenience.
Expand All @@ -1646,7 +1648,7 @@ def _add_converter(self, converter: ConverterSig[typing.Any], /) -> None:
def bind_client(self, client: tanjun.Client, /) -> None:
self._client = client
for converter in self._converters:
if isinstance(converter, conversion.BaseConverter):
if isinstance(converter, conversion.BaseConverter): # pyright: ignore[reportUnnecessaryIsInstance]
converter.check_client(client, f"{self._key} parameter")

def bind_component(self, component: tanjun.Component, /) -> None:
Expand Down

0 comments on commit 89eb6a5

Please sign in to comment.