Skip to content

Enforce error code on type: ignore #11

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
KotlinIsland opened this issue Oct 22, 2021 · 3 comments
Closed

Enforce error code on type: ignore #11

KotlinIsland opened this issue Oct 22, 2021 · 3 comments
Milestone

Comments

@KotlinIsland
Copy link
Owner

Cringe:

a: int = "asdf"   # type: ignore

Based:

a: int = "asdf"   # type: ignore[assignment]
@KotlinIsland
Copy link
Owner Author

Given that:

1 + "" # type: ignore

will not give an error "no-error-code"

Should you be able to suppress that error? it seems that doing so would be completely redundant:

1 + "" # type: ignore[no-error-code]

Does this mean that all type errors are now ignored, or only "no-error-code" errors?

@KotlinIsland
Copy link
Owner Author

What about a new error code "all" that will catch all errors, except for "unused-ignore"?

@KotlinIsland
Copy link
Owner Author

closed in #19

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

No branches or pull requests

1 participant