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

Add error code to bare type ignore #544

Closed
jonyscathe opened this issue Aug 2, 2023 · 0 comments · Fixed by #547
Closed

Add error code to bare type ignore #544

jonyscathe opened this issue Aug 2, 2023 · 0 comments · Fixed by #547

Comments

@jonyscathe
Copy link

Hey, after PR #489 my generated code is failing mypy with option ignore-without-code due to bare type ignore comments.

The error I am getting is:
myfile.pyi:16: error: "type: ignore" comment without error code (consider "type: ignore[misc, type-arg]" instead) [ignore-without-code]

Any objections to [misc, type-arg] being thrown on the end of the type ignore comments generated here: https://github.com/nipunn1313/mypy-protobuf/blob/main/mypy_protobuf/main.py#L727 ?

Or I can always turn that mypy option off for this particular project.

nipunn1313 pushed a commit that referenced this issue Aug 3, 2023
This supports running mypy with `ignore-without-code`.

Fixes #544
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 a pull request may close this issue.

1 participant