diff options
-rw-r--r-- | .github/workflows/ci.yml | 2 | ||||
-rw-r--r-- | pyproject.toml | 2 | ||||
-rw-r--r-- | test-requirements.txt | 1 | ||||
-rw-r--r-- | tox.ini | 6 |
4 files changed, 9 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a7105f..038d4f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: if: matrix.python-version == '3.9' run: | pip install tox tox-gh-actions - tox -e flake8 + tox -e flake8,black - name: Disable IPv6 localhost run: | sudo sed -i '/::1/d' /etc/hosts diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..86d2590 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[tool.black] +target-version = ['py36', 'py37', 'py38', 'py39'] diff --git a/test-requirements.txt b/test-requirements.txt index dceb81f..82a07e1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,4 @@ +black==21.11b1 pytest pytest-cov gevent==20.9.0; "PyPy" not in platform_python_implementation @@ -1,5 +1,5 @@ [tox] -envlist = py36, py37, py38, py39, pypy, pypy3, flake8, integration +envlist = py36, py37, py38, py39, pypy, pypy3, flake8, black, integration skip_missing_interpreters = True # Automatic envs (pyXX) will only use the python version appropriate to that # env and ignore basepython inherited from [testenv] if we set @@ -27,6 +27,10 @@ commands = flake8 python setup.py check --restructuredtext +[testenv:black] +commands = + black --check . + [testenv:coverage] commands = py.test --cov=pymemcache |