Skip to content

Commit

Permalink
chore: add black dependencies to the build
Browse files Browse the repository at this point in the history
  • Loading branch information
ceache committed Oct 17, 2022
1 parent cb2fe85 commit 951f744
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -30,6 +30,7 @@ zookeeper/
.project
.pydevproject
.tox
venv
/.settings
/.metadata

Expand Down
1 change: 1 addition & 0 deletions constraints.txt
@@ -1,4 +1,5 @@
# Consistent testing environment.
black==22.10.0
coverage==6.3.2
flake8==3.9.2
mock==3.0.5
Expand Down
16 changes: 16 additions & 0 deletions pyproject.toml
Expand Up @@ -3,3 +3,19 @@ build-backend = 'setuptools.build_meta'
requires = [
'setuptools >= 46.4.0',
]

[tool.black]
line-length = 79
target-version = ['py37', 'py38', 'py39', 'py310']
include = '\.pyi?$'
# 'extend-exclude' excludes files or directories in addition to the defaults
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
# (
# ^/foo.py # exclude a file named foo.py in the root of the project.
# | .*_pb2.py # exclude autogenerated Protocol Buffer files anywhere in the
# )
# # project.
extend-exclude = '''
'''

4 changes: 3 additions & 1 deletion setup.cfg
Expand Up @@ -8,7 +8,8 @@ description = "Higher Level Zookeeper Client"
long_description = file: README.md, CHANGES.md
long_description_content_type = text/markdown
license = Apache 2.0
license_file = LICENSE
license_files =
LICENSE
platform = any
keywords = zookeeper, lock, leader, configuration
classifiers =
Expand Down Expand Up @@ -95,3 +96,4 @@ exclude =
build/,dist/,*egg,
docs/conf.py,
zookeeper/

18 changes: 14 additions & 4 deletions tox.ini
Expand Up @@ -5,8 +5,9 @@ requires=
tox-wheel>=0.6.0
skip_missing_interpreters=True
envlist =
pep8,
{gevent,eventlet,sasl,docs},
pep8,black,
gevent,eventlet,sasl,
docs,
pypy3
isolated_build = true

Expand Down Expand Up @@ -42,9 +43,18 @@ commands =
commands = - codecov -e TOX_VENV,ZOOKEEPER_VERSION

[testenv:pep8]
extra = alldeps
basepython = python3
extras = alldeps
deps =
flake8==3.7.9
flake8
usedevelop = True
commands = flake8 {posargs} {toxinidir}/kazoo

[testenv:black]
basepython = python3
extras =
deps =
black
usedevelop = True
commands = black --check {posargs: {toxinidir}/kazoo {toxinidir}/kazoo}

0 comments on commit 951f744

Please sign in to comment.