Skip to content

Commit

Permalink
STYLE: upgrade flake8 to version 4+ (pandas-dev#45053)
Browse files Browse the repository at this point in the history
* update flake repo url and flake version

* bump flake8 and flake8 related dependencies

* revert one of the dependency dumps

* remove cython from flake8 lint
  • Loading branch information
MiTo0o authored Dec 27, 2021
1 parent 6de11bb commit 5606684
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 34 deletions.
18 changes: 4 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,15 @@ repos:
# we can lint all header files since they aren't "generated" like C files are.
exclude: ^pandas/_libs/src/(klib|headers)/
args: [--quiet, '--extensions=c,h', '--headers=h', --recursive, '--filter=-readability/casting,-runtime/int,-build/include_subdir']
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: &flake8_dependencies
- flake8==3.9.2
- flake8-comprehensions==3.1.0
- flake8==4.0.1
- flake8-comprehensions==3.7.0
- flake8-bugbear==21.3.2
- pandas-dev-flaker==0.2.0
- id: flake8
alias: flake8-cython
name: flake8 (cython)
types: [cython]
args: [--append-config=flake8/cython.cfg]
- id: flake8
name: flake8 (cython template)
files: \.pxi\.in$
types: [text]
args: [--append-config=flake8/cython-template.cfg]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ dependencies:
# code checks
- black=21.5b2
- cpplint
- flake8=3.9.2
- flake8=4.0.1
- flake8-bugbear=21.3.2 # used by flake8, find likely bugs
- flake8-comprehensions=3.1.0 # used by flake8, linting of unnecessary comprehensions
- flake8-comprehensions=3.7.0 # used by flake8, linting of unnecessary comprehensions
- isort>=5.2.1 # check that imports are in the right order
- mypy=0.920
- pre-commit>=2.9.2
Expand Down
3 changes: 0 additions & 3 deletions flake8/cython-template.cfg

This file was deleted.

13 changes: 0 additions & 13 deletions flake8/cython.cfg

This file was deleted.

4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ asv
cython>=0.29.24
black==21.5b2
cpplint
flake8==3.9.2
flake8==4.0.1
flake8-bugbear==21.3.2
flake8-comprehensions==3.1.0
flake8-comprehensions==3.7.0
isort>=5.2.1
mypy==0.920
pre-commit>=2.9.2
Expand Down

0 comments on commit 5606684

Please sign in to comment.