Skip to content

Commit

Permalink
typing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FasterSpeeding committed Apr 22, 2024
1 parent 633b78b commit a03c1b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tanjun/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,9 +1463,10 @@ def __getitem__(cls, enum_: type[_EnumT], /) -> type[_EnumT]:
else:
raise TypeError("Enum must be a subclass of str, float or int")

enum_onverter = _EnumConverter(enum_) # pyright: ignore[reportArgumentType]
# TODO: do we want to wrap the convert callback to give better failed parse messages?
return typing.cast(
"type[_EnumT]", typing.Annotated[enum_, choices, converter, _EnumConverter(enum_), _OptionMarker(type_)]
"type[_EnumT]", typing.Annotated[enum_, choices, converter, enum_onverter, _OptionMarker(type_)]
)


Expand Down

0 comments on commit a03c1b4

Please sign in to comment.