Skip to content

Improve enum stubs#7362

Merged
srittau merged 1 commit intopython:masterfrom
AlexWaygood:patch-3
Feb 22, 2022
Merged

Improve enum stubs#7362
srittau merged 1 commit intopython:masterfrom
AlexWaygood:patch-3

Conversation

@AlexWaygood
Copy link
Copy Markdown
Member

  • Improve TypeVar names
  • object -> Any in Enum.__new__ (there are restrictions on the kinds of objects that can be passed in, they're just not expressable in the stubs.
  • Delete pointless Self | int unions, since Self is a subtype of int for these methods.

- Improve TypeVar names
- `object` -> `Any` in `Enum.__new__` (there _are_ restrictions on the kinds of objects that can be passed in, they're just not expressable in the stubs.
- Delete pointless `Self | int` unions, since `Self` is a subtype of `int` for these methods.
@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit 1610949 into python:master Feb 22, 2022
@AlexWaygood AlexWaygood deleted the patch-3 branch February 22, 2022 19:18
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