We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d19b1b2 commit a1d4d07Copy full SHA for a1d4d07
docs/spec/enums.rst
@@ -123,8 +123,9 @@ statically in cases where dynamic values are used.
123
genus: str # Non-member attribute
124
species: str # Non-member attribute
125
126
- CAT = ... # Member attribute
127
- DOG = ... # Member attribute
+ CAT = 1 # Member attribute with known value and type
+ DOG = cast(int, ...) # Member attribute with unknown value and known type
128
+ BIRD = ... # Member attribute with unknown value and type
129
130
* Members defined within an enum class should not include explicit type
131
annotations. Type checkers should infer a literal type for all members.
0 commit comments