mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Support `StrEnum` in `python3.11`

Open sobolevn opened this issue 4 years ago • 1 comments

Source: https://github.com/python/cpython/blob/4fe5585240f64c3d14eb635ff82b163f92074b3a/Lib/enum.py#L1118 Typeshed: https://github.com/python/typeshed/blob/f9cedff5af015cd2814b3e9ed05ebe10e778585d/stdlib/enum.pyi#L82-L97

We would need to treat it as .is_enum.

sobolevn avatar Dec 11 '21 12:12 sobolevn

Is anyone working on this? If not, I could try to tackle it myself but I'd need a few pointers to get me started.

odesenfans avatar Jan 21 '23 17:01 odesenfans

i see this commit claims to add support, but i'm still seeing

etl\table_transformers\state.py:11: error: List item 0 has incompatible type "str"; expected "ColumnNames"  [list-item]

where ColumnNames is a strenum.

DrewMcArthur avatar Feb 23 '23 23:02 DrewMcArthur

Mypy 1.5 appears to support StrEnum. Is there anything left to do, or can this be closed?

erictraut avatar Aug 12 '23 20:08 erictraut