Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use assignment instead of annotation in third party enums #11957

Merged
merged 3 commits into from
May 18, 2024

Conversation

hamdanal
Copy link
Contributor

Follow up to #11956.

This PR handles all third party stubs except Pillow and pygit2 that I'll change in a follow up.

This comment has been minimized.

WORD: int
X: int
VERBOSE: int
A = RegexFlag.A
Copy link
Member

Choose a reason for hiding this comment

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

Should all of the module constants in this file be Final?

Suggested change
A = RegexFlag.A
A: Final = RegexFlag.A

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like pytype isn't happy about this change

Copy link
Member

Choose a reason for hiding this comment

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

Ah well, thanks for trying! :-)

This comment has been minimized.

Copy link
Contributor

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

@srittau srittau merged commit bd306f6 into python:main May 18, 2024
42 checks passed
@srittau srittau mentioned this pull request May 18, 2024
@hamdanal hamdanal deleted the enum-thirdparty branch May 18, 2024 15:52
@hamdanal hamdanal mentioned this pull request Jun 1, 2024
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.

None yet

3 participants