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

Configure flake8 to lint stubs #450

Merged
merged 3 commits into from Nov 1, 2021
Merged

Configure flake8 to lint stubs #450

merged 3 commits into from Nov 1, 2021

Conversation

DMRobertson
Copy link
Contributor

By default, it only looks for .py files, ignoring .pyi stubs.

This
- instructs flake8 to inspect .pyi files
- adds a new class `Y of errors bespoke to stub file conventions

We suppress the `E` errors from pycodestyle because I'm guessing they
don't apply to stub files. (And black should have us covered anyway.)

Move the flake8 run on stubs into its own job to limit the imapact of
`--ignore E`.
@DMRobertson DMRobertson requested a review from a team as a code owner October 29, 2021 15:15
scripts-dev/lint.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@squahtx squahtx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@DMRobertson DMRobertson merged commit ca8640c into main Nov 1, 2021
@DMRobertson DMRobertson deleted the dmr/mypy/lint-stubs-2 branch November 1, 2021 11:55
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.

None yet

2 participants