Skip to content

Commit bf2612d

Browse files
update flake8 config + add to CI code checks
1 parent 38ab752 commit bf2612d

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

ci/code_checks.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ fi
5252
### LINTING ###
5353
if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
5454

55+
echo "black --version"
56+
black --version
57+
58+
MSG='Checking black formatting' ; echo $MSG
59+
black pandas --check
60+
RET=$(($RET + $?)) ; echo $MSG "DONE"
61+
5562
# `setup.cfg` contains the list of error codes that are being ignored in flake8
5663

5764
echo "flake8 --version"

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dependencies:
1616
- cython>=0.28.2
1717

1818
# code checks
19+
- black
1920
- cpplint
2021
- flake8
2122
- flake8-comprehensions # used by flake8, linting of unnecessary comprehensions

setup.cfg

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ tag_prefix = v
1212
parentdir_prefix = pandas-
1313

1414
[flake8]
15-
max-line-length = 79
15+
max-line-length = 88
1616
ignore =
17+
E501, # longer line length
18+
E203, # space before : (needed for how black formats slicing)
19+
E231, # space after comma (needed for how black formats getitem with final comma)
1720
W503, # line break before binary operator
1821
W504, # line break after binary operator
1922
E402, # module level import not at top of file

0 commit comments

Comments
 (0)