diff options
author | Charles-Henri de Boysson <ceache@users.noreply.github.com> | 2022-10-14 23:54:43 -0400 |
---|---|---|
committer | Charles-Henri de Boysson <ceache@users.noreply.github.com> | 2022-10-17 00:45:48 -0400 |
commit | 951f744272ad69875827689b3f15ca43c79aae11 (patch) | |
tree | 21af5094a9c69a89444a21112043347062d16e75 | |
parent | cb2fe8575924a548b07f29210a058091a017c4fc (diff) | |
download | kazoo-951f744272ad69875827689b3f15ca43c79aae11.tar.gz |
chore: add black dependencies to the build
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | constraints.txt | 1 | ||||
-rw-r--r-- | pyproject.toml | 16 | ||||
-rw-r--r-- | setup.cfg | 4 | ||||
-rw-r--r-- | tox.ini | 18 |
5 files changed, 35 insertions, 5 deletions
@@ -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 = ''' +''' + @@ -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/ + @@ -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} + |