Skip to content

Disable pytype pyi-error globally #459

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

boomanaiden154
Copy link
Collaborator

This patch disable pyi-error globally. We have a lot of manual disables for this error sprinkled throughout the codebase, to the point where we should just disable it globally given the noise that it causes.

This patch disable pyi-error globally. We have a lot of manual disables
for this error sprinkled throughout the codebase, to the point where we
should just disable it globally given the noise that it causes.
@mtrofin
Copy link
Collaborator

mtrofin commented Mar 3, 2025

would that let unwanted errors - i.e. cases we expect a pyi - just pass the type checker?

@boomanaiden154
Copy link
Collaborator Author

would that let unwanted errors - i.e. cases we expect a pyi - just pass the type checker?

Yes, but I'm not sure it's practically an issue. Pytype complains about this because it needs pyi files to obtain some information it needs for type checking. They exist in the vast majority of cases, but in some (with complex imports/module provides it seems), it just errors out. Given that every single error would require upstream refactoring or fixes in pytype and we've just been disabling them, I figured a global override would be reduce (the mostly useless) noise.

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