Skip to content

CI: run flake8-pyi with all the other flake8 plugins #47600

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
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ repos:
rev: 4.0.1
hooks:
- id: flake8
types: [text] # overwrite types: [python]
types_or: [python, pyi]
additional_dependencies: &flake8_dependencies
- flake8==4.0.1
- flake8-comprehensions==3.7.0
- flake8-bugbear==21.3.2
- flake8-pyi==22.5.1
- pandas-dev-flaker==0.5.0
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
Expand Down Expand Up @@ -229,11 +232,3 @@ repos:
entry: python scripts/validate_min_versions_in_sync.py
language: python
files: ^(ci/deps/actions-.*-minimum_versions\.yaml|pandas/compat/_optional\.py)$
- id: flake8-pyi
name: flake8-pyi
entry: flake8 --extend-ignore=E301,E302,E305,E701,E704
types: [pyi]
language: python
additional_dependencies:
- flake8==4.0.1
- flake8-pyi==22.5.1
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ dependencies:
- flake8=4.0.1
- flake8-bugbear=21.3.2 # used by flake8, find likely bugs
- flake8-comprehensions=3.7.0 # used by flake8, linting of unnecessary comprehensions
- flake8-pyi=22.5.1 # used by flake8, best practises for type stubs
- isort>=5.2.1 # check that imports are in the right order
- mypy=0.960
- pre-commit>=2.15.0
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ cpplint
flake8==4.0.1
flake8-bugbear==21.3.2
flake8-comprehensions==3.7.0
flake8-pyi==22.5.1
isort>=5.2.1
mypy==0.960
pre-commit>=2.15.0
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ per-file-ignores =
pandas/testing.py:PDF014
# can't use fixtures in asv
asv_bench/*:PDF016
# black formats pyi files differently
*.pyi:E301,E302,E305,E701,E704


[flake8-rst]
Expand Down