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

Stubtest: verify stub methods or properties are decorated with @final if they are decorated with @final at runtime #14951

Merged
merged 7 commits into from
Mar 24, 2023

Conversation

AlexWaygood
Copy link
Member

This implements most of #14924. The only thing it doesn't implement is verification for overloaded methods decorated with @final -- I tried working on that, but hit #14950.

…l` if they are decorated with `@final` at runtime
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thank you for taking this up! 👍

mypy/test/teststubtest.py Show resolved Hide resolved
mypy/test/teststubtest.py Show resolved Hide resolved
@sobolevn
Copy link
Member

I also thing that overloads can easily be ignored at this stage. Because I don't think many users have final overloads in their runtime source code + separate stubs :)

@AlexWaygood AlexWaygood added the topic-final PEP 591 label Mar 24, 2023
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

LGTM!

@sobolevn sobolevn merged commit 01a088b into python:master Mar 24, 2023
@AlexWaygood AlexWaygood deleted the stubtest-final-methods branch March 24, 2023 17:28
@AlexWaygood
Copy link
Member Author

Thanks @sobolevn!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants