Skip to content

Setup flake8-pyi to lint stubs #128

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
sobolevn opened this issue Aug 12, 2019 · 6 comments · Fixed by #132 or #1253
Closed

Setup flake8-pyi to lint stubs #128

sobolevn opened this issue Aug 12, 2019 · 6 comments · Fixed by #132 or #1253
Assignees
Labels
enhancement New feature or request

Comments

@sobolevn
Copy link
Member

It will enforce ... instead of None, find useless nodes for annotations, etc.
https://github.com/ambv/flake8-pyi

@hoefling
Copy link
Contributor

@sobolevn does the decision on not using flake8-pyi still hold? (If I am reading #132 correctly) IMO making the stubs compliant to PEP 585, PEP 604, PEP 613 & friends would improve stubs quality, flake8-pyi also can prevent commits containing unused imports etc etc.

@sobolevn
Copy link
Member Author

There are so many violations out there.

If you have free time to introduce flake8-pyi and refactor all existing problems - you are more than welcome :)

@hoefling
Copy link
Contributor

@sobolevn let me give it a try then. Most of the findings can be eliminated in an automated fashion - I already did this for PEP 604 imports in typeshed in python/typeshed#5564 and python/typeshed#5915, the scripts should be still functional.

@sobolevn sobolevn reopened this Nov 13, 2022
@sobolevn
Copy link
Member Author

Thank you! This will impove our code quality :)

@intgr
Copy link
Collaborator

intgr commented Nov 13, 2022

If you're in for an extra challenge, you can do the same to https://github.com/typeddjango/djangorestframework-stubs repository too. :)

@hoefling
Copy link
Contributor

@intgr gladly, but let's discuss #1253 first, I can then apply the same rules for DRF stubs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
3 participants