-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add stricter linting to CI #996
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
Comments
I like to set everything up as flake8 plugins as this enables us to do the following:
You wouldn't have to rewrite that much, you're still going to use your visitor. You just need to assign error codes and adopt the class API that a plugin expects. Look here for instance how this is implemented: |
Thanks, sounds good. I'll start sending you some PRs. |
A couple of ideas we came up with during the sprint:
|
We have flake8-pyi and stubtest now, this issue doesn't add much. |
There are several common kinds of mistakes in typeshed code that can be detected by a static linter. I wrote a small tool the other day to detect some: https://github.com/JelleZijlstra/stublint. It currently detects certain problems with platform and version checks, typevars that aren't marked private, extraneous code inside functions, and some missing annotations.
How should we incorporate these checks in to typeshed's CI? A few options:
I feel like extending flake8-pyi is the better option, but would like to hear from others.
The text was updated successfully, but these errors were encountered: