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

More LSP compatibility on arg names #18363

Merged
merged 4 commits into from
Dec 30, 2024
Merged

Conversation

hauntsaninja
Copy link
Collaborator

Got lost when #18356 was broken up

This comment has been minimized.

mypy/plugin.py Show resolved Hide resolved
mypy/plugin.py Show resolved Hide resolved
mypy/plugin.py Show resolved Hide resolved
mypy/semanal_shared.py Show resolved Hide resolved
mypy/plugin.py Show resolved Hide resolved
mypy/semanal_shared.py Show resolved Hide resolved
mypy/plugin.py Show resolved Hide resolved
mypy/semanal_shared.py Show resolved Hide resolved
Copy link
Collaborator Author

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

I prefer positional-only arguments here, since this is part of mypy's plugin API. This way plugin authors get errors upfront, instead of perhaps later when running their plugin against an older version of mypy.

@cdce8p
Copy link
Collaborator

cdce8p commented Dec 29, 2024

I prefer positional-only arguments here, since this is part of mypy's plugin API. This way plugin authors get errors upfront, instead of perhaps later when running their plugin against an older version of mypy.

Makes sense. The methods marked with pos-only are unlikely to be called with keyword args anyway. Would you mind updating the argument names in the implementation, so that these are at least consistent (i.e. the ones I liked to above)?

Copy link
Collaborator

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

Thanks @hauntsaninja 👍🏻
Last thing, could you also update the comment on the API changes issue? I don't have the permission to do that, unfortunately. #6617 (comment)

Copy link
Contributor

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

@hauntsaninja hauntsaninja merged commit c821503 into python:master Dec 30, 2024
18 checks passed
@hauntsaninja hauntsaninja deleted the lsp-name branch December 30, 2024 00:23
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