From 591039148add35db7553a81360beb85e10b1c416 Mon Sep 17 00:00:00 2001 From: Derzan Chiang Date: Fri, 24 Dec 2021 08:26:57 -0800 Subject: [PATCH 1/4] update flake repo url and flake version --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea15e135455ba..91b1cd8e3d5ce 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,12 +35,12 @@ 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==4.0.1 - flake8-comprehensions==3.1.0 - flake8-bugbear==21.3.2 - pandas-dev-flaker==0.2.0 From d8fcf5db2be8987ee0cc7e3128372659e7601599 Mon Sep 17 00:00:00 2001 From: Derzan Chiang Date: Fri, 24 Dec 2021 08:38:27 -0800 Subject: [PATCH 2/4] bump flake8 and flake8 related dependencies --- .pre-commit-config.yaml | 4 ++-- environment.yml | 4 ++-- requirements-dev.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 91b1cd8e3d5ce..0771c4ab310aa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: - id: flake8 additional_dependencies: &flake8_dependencies - flake8==4.0.1 - - flake8-comprehensions==3.1.0 + - flake8-comprehensions==3.7.0 - flake8-bugbear==21.3.2 - pandas-dev-flaker==0.2.0 - id: flake8 @@ -98,7 +98,7 @@ repos: entry: flake8-rst types: [rst] args: [--filename=*.rst] - additional_dependencies: [flake8-rst==0.7.0, flake8==3.7.9] + additional_dependencies: [flake8-rst==0.7.0, flake8==4.0.1] - id: unwanted-patterns name: Unwanted patterns language: pygrep 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/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 From 6acacc68692cb27909d68bcbd93bf3b611c43b91 Mon Sep 17 00:00:00 2001 From: Derzan Chiang Date: Fri, 24 Dec 2021 11:56:26 -0800 Subject: [PATCH 3/4] revert one of the dependency dumps --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0771c4ab310aa..0fbd7eda5c26b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -98,7 +98,7 @@ repos: entry: flake8-rst types: [rst] args: [--filename=*.rst] - additional_dependencies: [flake8-rst==0.7.0, flake8==4.0.1] + additional_dependencies: [flake8-rst==0.7.0, flake8==3.7.9] - id: unwanted-patterns name: Unwanted patterns language: pygrep From 28cd1d6bf24d88148bba9fb6bdee74ff9917a95c Mon Sep 17 00:00:00 2001 From: Derzan Chiang Date: Mon, 27 Dec 2021 01:27:03 -0500 Subject: [PATCH 4/4] remove cython from flake8 lint --- .pre-commit-config.yaml | 10 ---------- flake8/cython-template.cfg | 3 --- flake8/cython.cfg | 13 ------------- 3 files changed, 26 deletions(-) delete mode 100644 flake8/cython-template.cfg delete mode 100644 flake8/cython.cfg diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0fbd7eda5c26b..6ab940efaddd4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,16 +44,6 @@ repos: - 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/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,