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
importenumclassEnumWithAuto(enum.IntEnum):
A=enum.auto()
B=10auto_enum=EnumWithAuto.Aprint(auto_enum.value.bit_length()) # E1101: Instance of 'auto' has no 'bit_length' member (no-member)enum_val=EnumWithAuto(123)
print(enum_val.value.bit_length()) # Finespecific_enum=EnumWithAuto.Bprint(specific_enum.value.bit_length()) # Fine
All three of these EnumWithAuto.value should return an int, but only the B and __init__(123) instances do. A (since it uses enum.auto()) seems to return a type of auto, but that should be an int, since this uses an IntEnum.
The text was updated successfully, but these errors were encountered:
All three of these
EnumWithAuto.value
should return anint
, but only theB
and__init__(123)
instances do.A
(since it usesenum.auto()
) seems to return a type ofauto
, but that should be anint
, since this uses anIntEnum
.The text was updated successfully, but these errors were encountered: