Skip to content

Commit e25ccde

Browse files
authored
Merge pull request #3 from CenterForOpenScience/feature/linting
Add automatic linting / reformatting tools.
2 parents e9c9431 + 392ec56 commit e25ccde

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

Diff for: Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
flake:
2+
flake8
3+
4+
black:
5+
black -S api base components markers.py pages settings.py tests utils.py
6+
7+
isort:
8+
isort .
9+
10+
lintall: black isort flake

Diff for: requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ pre-commit==1.18.3
1212
ipdb==0.12.2
1313
axe-selenium-python==2.1.6
1414
pandas==1.2.4
15+
isort==5.8.0
16+
black==19.10b0

Diff for: setup.cfg

+12-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,16 @@
77
# E266: too many leading '#' for block comment
88
[flake8]
99
ignore = E501,E127,E128,E265,E301,E302,E266,E731,N803,N806,E701
10-
max-line-length = 100
10+
# max-line-length = 100
1111
exclude = .git,tasks/*,settings/*,misc/*,helpers/*,staging/*,selenium/*
12+
max-line-length = 88
13+
extend-ignore = E203, W503
14+
# inline-quotes = double
15+
16+
[isort]
17+
multi_line_output = 3
18+
include_trailing_comma = True
19+
force_grid_wrap = 0
20+
use_parentheses = True
21+
ensure_newline_before_comments = True
22+
line_length = 88

0 commit comments

Comments
 (0)