Skip to content

Commit 951f744

Browse files
committed
chore: add black dependencies to the build
1 parent cb2fe85 commit 951f744

File tree

5 files changed

+35
-5
lines changed

5 files changed

+35
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ zookeeper/
3030
.project
3131
.pydevproject
3232
.tox
33+
venv
3334
/.settings
3435
/.metadata
3536

constraints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Consistent testing environment.
2+
black==22.10.0
23
coverage==6.3.2
34
flake8==3.9.2
45
mock==3.0.5

pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,19 @@ build-backend = 'setuptools.build_meta'
33
requires = [
44
'setuptools >= 46.4.0',
55
]
6+
7+
[tool.black]
8+
line-length = 79
9+
target-version = ['py37', 'py38', 'py39', 'py310']
10+
include = '\.pyi?$'
11+
# 'extend-exclude' excludes files or directories in addition to the defaults
12+
# A regex preceded with ^/ will apply only to files and directories
13+
# in the root of the project.
14+
# (
15+
# ^/foo.py # exclude a file named foo.py in the root of the project.
16+
# | .*_pb2.py # exclude autogenerated Protocol Buffer files anywhere in the
17+
# )
18+
# # project.
19+
extend-exclude = '''
20+
'''
21+

setup.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ description = "Higher Level Zookeeper Client"
88
long_description = file: README.md, CHANGES.md
99
long_description_content_type = text/markdown
1010
license = Apache 2.0
11-
license_file = LICENSE
11+
license_files =
12+
LICENSE
1213
platform = any
1314
keywords = zookeeper, lock, leader, configuration
1415
classifiers =
@@ -95,3 +96,4 @@ exclude =
9596
build/,dist/,*egg,
9697
docs/conf.py,
9798
zookeeper/
99+

tox.ini

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ requires=
55
tox-wheel>=0.6.0
66
skip_missing_interpreters=True
77
envlist =
8-
pep8,
9-
{gevent,eventlet,sasl,docs},
8+
pep8,black,
9+
gevent,eventlet,sasl,
10+
docs,
1011
pypy3
1112
isolated_build = true
1213

@@ -42,9 +43,18 @@ commands =
4243
commands = - codecov -e TOX_VENV,ZOOKEEPER_VERSION
4344

4445
[testenv:pep8]
45-
extra = alldeps
46+
basepython = python3
47+
extras = alldeps
4648
deps =
47-
flake8==3.7.9
49+
flake8
4850
usedevelop = True
4951
commands = flake8 {posargs} {toxinidir}/kazoo
5052

53+
[testenv:black]
54+
basepython = python3
55+
extras =
56+
deps =
57+
black
58+
usedevelop = True
59+
commands = black --check {posargs: {toxinidir}/kazoo {toxinidir}/kazoo}
60+

0 commit comments

Comments
 (0)