From 8117892ea5da9969f49756933bcbaa576ee7c5d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Sep 2020 14:18:23 -0400 Subject: [PATCH] Use enabled plugin configuration to enable mypy and black when the plugin is present. Ref jaraco/skeleton#22. --- pyproject.toml | 8 ++++---- pytest.ini | 2 +- setup.cfg | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9b02ee75..9cd13ba4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,9 +8,9 @@ skip-string-normalization = true [tool.setuptools_scm] # jaraco/skeleton#22 -[tool.jaraco.pytest.opts.--black] -action = "store_true" +[tool.jaraco.pytest.plugins.black] +addopts = "--black" # jaraco/skeleton#22 -[tool.jaraco.pytest.opts.--mypy] -action = "store_true" +[tool.jaraco.pytest.plugins.mypy] +addopts = "--mypy" diff --git a/pytest.ini b/pytest.ini index 381b3271..5ffd7f73 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,6 @@ [pytest] norecursedirs=dist build .tox .eggs -addopts=--doctest-modules --flake8 --black --cov --mypy +addopts=--doctest-modules --flake8 --cov doctest_optionflags=ALLOW_UNICODE ELLIPSIS # workaround for warning pytest-dev/pytest#6178 junit_family=xunit2 diff --git a/setup.cfg b/setup.cfg index e9dd1772..eb834fef 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,7 @@ testing = pytest-cov pytest-mypy; python_implementation != "PyPy" # jaraco/skeleton#22 - jaraco.test >= 3 + jaraco.test >= 3.1.1 # local