summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles-Henri de Boysson <ceache@users.noreply.github.com>2022-10-14 23:54:43 -0400
committerCharles-Henri de Boysson <ceache@users.noreply.github.com>2022-10-17 00:45:48 -0400
commit951f744272ad69875827689b3f15ca43c79aae11 (patch)
tree21af5094a9c69a89444a21112043347062d16e75
parentcb2fe8575924a548b07f29210a058091a017c4fc (diff)
downloadkazoo-951f744272ad69875827689b3f15ca43c79aae11.tar.gz
chore: add black dependencies to the build
-rw-r--r--.gitignore1
-rw-r--r--constraints.txt1
-rw-r--r--pyproject.toml16
-rw-r--r--setup.cfg4
-rw-r--r--tox.ini18
5 files changed, 35 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 87c7457..f46e93c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,7 @@ zookeeper/
.project
.pydevproject
.tox
+venv
/.settings
/.metadata
diff --git a/constraints.txt b/constraints.txt
index 92d70e5..ce767e3 100644
--- a/constraints.txt
+++ b/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
diff --git a/pyproject.toml b/pyproject.toml
index 9db4899..70668b1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -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 = '''
+'''
+
diff --git a/setup.cfg b/setup.cfg
index ba528cd..5380435 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -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 =
@@ -95,3 +96,4 @@ exclude =
build/,dist/,*egg,
docs/conf.py,
zookeeper/
+
diff --git a/tox.ini b/tox.ini
index 5ab4f33..222f663 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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
@@ -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}
+