Describe the bug
When &-ing an int and a member of an enum.IntFlag, another member of the flags is returned, but Pyright reveals it as an int. I believe this isn't an issue with typeshed, since mypy has the correct behaviour.
Code or Screenshots
Code sample in pyright playground
from enum import auto, IntFlag
class Flags(IntFlag):
A = auto()
B = auto()
reveal_type(int() & Flags.A)
Describe the bug
When &-ing an
intand a member of anenum.IntFlag, another member of the flags is returned, but Pyright reveals it as anint. I believe this isn't an issue with typeshed, since mypy has the correct behaviour.Code or Screenshots
Code sample in pyright playground