Open felix-hilden opened 1 year ago
I believe _generate_next_value_
should be decorated with @staticmethod
. But that crashes in python 3.8 and 3.9 . Not sure if that can be fixed on the type-definition side (see https://github.com/python/typeshed/issues/10428)
Hi, I've defined a custom enum base to copy the names of the enum items as values when using
auto()
. Mypy curiously throws anassignment
error about incompatible types when using the items as e.g. default arguments in a function. However, this only happens if the custom base is imported from another library (in site packages, using another local package is fine).Here's some example code:
The above is fine and produces no errors. However, when using the import instead, we get
I would assume that this is a bug, but if you have any other thoughts or debugging suggestions, let me know! I found another issue about the same private method in
Enum
in #7591, but the issue doesn't seem to be exactly related.Environment