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

Skip keyword-only params with invalid names in signature help #9398

Merged
merged 6 commits into from
Nov 7, 2024

Conversation

debonte
Copy link
Collaborator

@debonte debonte commented Nov 6, 2024

Updates the signature help provider to handle the scenarios mentioned in #9386. Signature help should not suggest to the user that they can use a kwarg to initialize the value of a dataclass field with an alias that is not a valid identifier.

I think showing position-only parameters with invalid names is fine. And position-or-keyword parameters are also ok to show given that the completion provider was already updated to not suggest these param names.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Nov 7, 2024

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

@debonte debonte merged commit 72c1e7c into microsoft:main Nov 7, 2024
18 checks passed
@debonte debonte deleted the invalidAlias branch November 7, 2024 06:28
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