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

Unpack forces all optional args #18243

Closed
alon-ba opened this issue Dec 4, 2024 · 1 comment
Closed

Unpack forces all optional args #18243

alon-ba opened this issue Dec 4, 2024 · 1 comment
Labels
bug mypy got something wrong

Comments

@alon-ba
Copy link

alon-ba commented Dec 4, 2024

Tried to use this method to type my kwargs:
microsoft/pylance-release#2541 (comment)

it produced some mypy bug:
microsoft/pylance-release#2541 (comment)

I also opened a bug for pylance:
microsoft/pylance-release#6732 (comment)

@alon-ba alon-ba added the bug mypy got something wrong label Dec 4, 2024
@brianschubert
Copy link
Collaborator

As Eric explained in microsoft/pylance-release#2541 (comment), mypy is behaving correctly. You can mark the field as NotRequired or specify total=False if you want the field to not be required.

@brianschubert brianschubert closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

2 participants