Skip to content

Commit a16501e

Browse files
ci: add flake8 and black configuration
1 parent 38f56ca commit a16501e

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.flake8

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[flake8]
2+
ignore =
3+
E402,
4+
E203,
5+
W503
6+
max-line-length = 300
7+
exclude =
8+
.git,
9+
test*.py,
10+
tools/*
11+
extend-exclude =
12+
dist,
13+
build,
14+
venv
15+
show-source = True
16+
statistics = True
17+
format = %(path)s:%(row)d,%(col)d:%(code)s:%(text)s:https://lintlyci.github.io/Flake8Rules/rules/%(code)s.html

pyproject.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,31 @@ requires = [
44
"setuptools_scm >= 2.0.0, <3"
55
]
66
build-backend = "setuptools.build_meta"
7+
8+
[tool.black]
9+
line-length = 88
10+
target-version = ['py37']
11+
include = '\.pyi?$'
12+
exclude = '''
13+
14+
(
15+
/(
16+
\.eggs # exclude a few common directories in the
17+
| \.git # root of the project
18+
| \.hg
19+
| \.mypy_cache
20+
| \.tox
21+
| \.venv
22+
| venv
23+
| _build
24+
| buck-out
25+
| build
26+
| dist
27+
| migrations
28+
| packages
29+
| \tools
30+
)/
31+
| foo.py # also separately exclude a file named foo.py in
32+
# the root of the project
33+
)
34+
'''

0 commit comments

Comments
 (0)