Bump Pyright to 1.1.265, fix type errors, and remove unnecessary ignores

This commit is contained in:
Bryan Forbes
2022-08-04 21:46:02 -05:00
committed by GitHub
parent 60079aee1b
commit d707019348
14 changed files with 30 additions and 30 deletions

View File

@ -140,7 +140,7 @@ class ConverterTransformer(app_commands.Transformer):
if inspect.ismethod(converter.convert):
return await converter.convert(ctx, value)
else:
return await converter().convert(ctx, value) # type: ignore
return await converter().convert(ctx, value)
elif isinstance(converter, Converter):
return await converter.convert(ctx, value)
except CommandError:
@ -205,7 +205,7 @@ def replace_parameter(
args = getattr(converter, '__args__', [])
if isinstance(converter, Range):
r = converter
param = param.replace(annotation=app_commands.Range[r.annotation, r.min, r.max]) # type: ignore
param = param.replace(annotation=app_commands.Range[r.annotation, r.min, r.max])
elif isinstance(converter, Greedy):
# Greedy is "optional" in ext.commands
# However, in here, it probably makes sense to make it required.