Skip to content

Add is_explicit_override flag to common.add_method for plugins #17418

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

Closed
wants to merge 3 commits into from

Conversation

sobolevn
Copy link
Member

@sobolevn
Copy link
Member Author

Ok, this is important:

 mypy/test/meta/_pytest.py:14: error: Method "__mypy-replace" is marked as an override, but no base method was found with this name  [misc]
    class PytestResult:
    ^~~~~~~~~~~~~~~~~~
mypy/test/data.py:425: error: Method "__mypy-replace" is marked as an override, but no base method was found with this name  [misc]
    class TestItem:
    ^~~~~~~~~~~~~~
Found 2 errors in 2 files (checked 302 source files)

This comment has been minimized.

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

ibis (https://github.com/ibis-project/ibis)
+ ibis/common/grounds.py:188: error: Method "__mypy-replace" is marked as an override, but no base method was found with this name  [misc]
+ ibis/config.py:16: error: Method "__mypy-replace" is marked as an override, but no base method was found with this name  [misc]

@sobolevn sobolevn closed this Jun 21, 2024
@sobolevn
Copy link
Member Author

This is not correct, I guess we have to ignore plugin_generated nodes instread.

sobolevn added a commit that referenced this pull request Jun 24, 2024
Closes typeddjango/django-stubs#2226
Closes #17417
Closes #17370
Closes #17224
This is an alternative to #17418

Thanks a lot to @sterliakov, I took a dataclasses test case from #17370

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

Plugin generated methods are reported with explicit-override error enabled explicit-override error code reports problems on generated methods
1 participant