Skip to content

Stubtest: fix another enum-related edge case#15943

Merged
hauntsaninja merged 1 commit intopython:masterfrom
AlexWaygood:more-enum-edge-cases
Aug 24, 2023
Merged

Stubtest: fix another enum-related edge case#15943
hauntsaninja merged 1 commit intopython:masterfrom
AlexWaygood:more-enum-edge-cases

Conversation

@AlexWaygood
Copy link
Copy Markdown
Member

No description provided.

Comment thread mypy/test/teststubtest.py
from typing_extensions import Final, Literal
class BytesEnum(bytes, enum.Enum):
a: bytes
FOO: Literal[BytesEnum.a]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's somewhat unlikely to come up in practice, but stubtest emits a false positive on this line using mypy master

@hauntsaninja hauntsaninja merged commit 4077dc6 into python:master Aug 24, 2023
@AlexWaygood AlexWaygood deleted the more-enum-edge-cases branch August 24, 2023 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants