diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea15e135455ba..6ab940efaddd4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/environment.yml b/environment.yml index 0e303d1fa7da2..ef6ec7352db05 100644 --- a/environment.yml +++ b/environment.yml @@ -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 diff --git a/flake8/cython-template.cfg b/flake8/cython-template.cfg deleted file mode 100644 index 3d7b288fd8055..0000000000000 --- a/flake8/cython-template.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -filename = *.pxi.in -select = E501,E302,E203,E111,E114,E221,E303,E231,E126,F403 diff --git a/flake8/cython.cfg b/flake8/cython.cfg deleted file mode 100644 index bf1f41647b34e..0000000000000 --- a/flake8/cython.cfg +++ /dev/null @@ -1,13 +0,0 @@ -[flake8] -filename = *.pyx,*.pxd -extend_ignore= - # whitespace before '(' - E211, - # missing whitespace around operator - E225, - # missing whitespace around arithmetic operator - E226, - # missing whitespace around bitwise or shift operator - E227, - # invalid syntax - E999, diff --git a/requirements-dev.txt b/requirements-dev.txt index a7bdc972fb203..2f80440e71d16 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -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