You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attributes in the LetterCase enum are functions, so they're being registered as methods rather than enum members.
Mypy doesn't recognise this as an issue, but Pyright shows errors when trying to do, e.g., @dataclass_json(letter_case=LetterCase.CAMEL):
Argument of type "(string: Unknown) -> (Unknown | Literal[''])" cannot be assigned to parameter "letter_case" of type "LetterCase | None" in function "dataclass_json" Type "(string: Unknown) -> (Unknown | Literal[''])" is not assignable to type "LetterCase | None" "function" is not assignable to "LetterCase" "function" is not assignable to "None"
Description
The attributes in the
LetterCase
enum are functions, so they're being registered as methods rather than enum members.Mypy doesn't recognise this as an issue, but Pyright shows errors when trying to do, e.g.,
@dataclass_json(letter_case=LetterCase.CAMEL)
:Code snippet that reproduces the issue
Describe the results you expected
LetterCase.CAMEL
should be an instance ofLetterCase
, so this assertion should passPython version you are using
Python 3.10.13
Environment description
The text was updated successfully, but these errors were encountered: