Skip to content

Conversation

@sterliakov
Copy link
Collaborator

@sterliakov sterliakov commented Nov 4, 2025

Fixes #20008.

Following the discussion in #20008, this PR explores a "flag container" approach to customizing checks for plugin-generated nodes.

As a real-world example, I patched pydantic mypy plugin (branch here) to address #19898. Using the flag container allowed me to remove the classmethod decorator application there which was just a wrong thing to do, probably misguided by the [override] error message for classmethods.

This looks easier than exposing the whole LSP checks infrastructure as public API.

If I understand correctly, this is fully backwards-compatible. Still should be mentioned in the plugin changes issue, though.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@sterliakov sterliakov marked this pull request as ready for review November 4, 2025 16:46
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.

Do not check LSP compatibility of plugin_generated nodes

1 participant