Skip to content

Commit faeb757

Browse files
MarcoGorelliKevin D Smith
authored and
Kevin D Smith
committed
CI unpin flake8, only run flake8-rst in pre-commit (pandas-dev#36722)
1 parent e1c9cc8 commit faeb757

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

.pre-commit-config.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ repos:
4646
files: ^(environment.yml|requirements-dev.txt)$
4747
pass_filenames: false
4848
additional_dependencies: [pyyaml]
49+
- id: flake8-rst
50+
name: flake8-rst
51+
description: Run flake8 on code snippets in docstrings or RST files
52+
language: python
53+
entry: flake8-rst
54+
types: [rst]
55+
args: [--filename=*.rst]
56+
additional_dependencies: [flake8-rst==0.7.0, flake8==3.7.9]
4957
- repo: https://github.com/asottile/yesqa
5058
rev: v1.2.2
5159
hooks:

ci/code_checks.sh

-7
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
7373
flake8 --format="$FLAKE8_FORMAT" pandas/_libs --append-config=flake8/cython-template.cfg
7474
RET=$(($RET + $?)) ; echo $MSG "DONE"
7575

76-
echo "flake8-rst --version"
77-
flake8-rst --version
78-
79-
MSG='Linting code-blocks in .rst documentation' ; echo $MSG
80-
flake8-rst doc/source --filename=*.rst --format="$FLAKE8_FORMAT"
81-
RET=$(($RET + $?)) ; echo $MSG "DONE"
82-
8376
# Check that cython casting is of the form `<type>obj` as opposed to `<type> obj`;
8477
# it doesn't make a difference, but we want to be internally consistent.
8578
# Note: this grep pattern is (intended to be) equivalent to the python

environment.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ dependencies:
1717
# code checks
1818
- black=20.8b1
1919
- cpplint
20-
- flake8<3.8.0 # temporary pin, GH#34150
20+
- flake8
2121
- flake8-comprehensions>=3.1.0 # used by flake8, linting of unnecessary comprehensions
22-
- flake8-rst>=0.6.0,<=0.7.0 # linting of code blocks in rst files
2322
- isort>=5.2.1 # check that imports are in the right order
2423
- mypy=0.782
2524
- pre-commit
@@ -113,4 +112,3 @@ dependencies:
113112
- pip:
114113
- git+https://github.com/pandas-dev/pydata-sphinx-theme.git@master
115114
- git+https://github.com/numpy/numpydoc
116-
- pyflakes>=2.2.0

requirements-dev.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ asv
88
cython>=0.29.21
99
black==20.8b1
1010
cpplint
11-
flake8<3.8.0
11+
flake8
1212
flake8-comprehensions>=3.1.0
13-
flake8-rst>=0.6.0,<=0.7.0
1413
isort>=5.2.1
1514
mypy==0.782
1615
pre-commit
@@ -79,4 +78,3 @@ tabulate>=0.8.3
7978
natsort
8079
git+https://github.com/pandas-dev/pydata-sphinx-theme.git@master
8180
git+https://github.com/numpy/numpydoc
82-
pyflakes>=2.2.0

0 commit comments

Comments
 (0)