Skip to content

"Argument has incompatible type" is [arg-type] and [misc]? #9083

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
Dreamsorcerer opened this issue Jul 1, 2020 · 0 comments · Fixed by #9090
Closed

"Argument has incompatible type" is [arg-type] and [misc]? #9083

Dreamsorcerer opened this issue Jul 1, 2020 · 0 comments · Fixed by #9090
Labels
bug mypy got something wrong

Comments

@Dreamsorcerer
Copy link
Contributor

When running mypy on some code I get this error message:
tesla_api/vehicle.py:70: error: Argument 2 to "setdefault" of "TypedDict" has incompatible type "None"; expected "int" [misc]

If i add a type: ignore[misc] to the line, then I get this error message:
tesla_api/vehicle.py:70: error: Argument 2 to "setdefault" of "TypedDict" has incompatible type "None"; expected "int" [arg-type]

Seems that this error is under both misc and arg-type categories.

Excepted behaviour: The error should only appear under the arg-type category, and not require ignoring 2 categories.

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

Successfully merging a pull request may close this issue.

2 participants