From 9a46114964bda023e7ab899ceda729acb7b0fa64 Mon Sep 17 00:00:00 2001 From: Alex Hedges Date: Sat, 12 Mar 2022 23:40:02 -0500 Subject: [PATCH 1/4] Eliminate pytest deprecation warnings --- src/tests/test_integration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/test_integration.py b/src/tests/test_integration.py index 9f255626..dbc6d315 100644 --- a/src/tests/test_integration.py +++ b/src/tests/test_integration.py @@ -121,7 +121,7 @@ def __exit__(self, *args, **kwargs): pass -@pytest.yield_fixture(scope="module") +@pytest.fixture(scope="module") def install_package(request): """Install the package in development mode for the tests. @@ -138,7 +138,7 @@ def install_package(request): ) -@pytest.yield_fixture(scope="function", params=['ini', 'toml']) +@pytest.fixture(scope="function", params=['ini', 'toml']) def env(request): """Add a testing environment to a test method.""" sandbox_settings = { From daa59961c9cc9286afce8907e269bfc32d0e39be Mon Sep 17 00:00:00 2001 From: Alex Hedges Date: Sat, 12 Mar 2022 23:40:54 -0500 Subject: [PATCH 2/4] Remove unused pytest configuration option --- tox.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/tox.ini b/tox.ini index 00e68c6d..ca1869f0 100644 --- a/tox.ini +++ b/tox.ini @@ -66,8 +66,6 @@ skip_install = {[testenv:install]skip_install} commands = {[testenv:install]commands} [pytest] -pep8ignore = - test.py E701 E704 norecursedirs = docs .tox addopts = -rw From 442a1fb1891aa7613f498e5ca56f011a5bc486ae Mon Sep 17 00:00:00 2001 From: Alex Hedges Date: Sat, 12 Mar 2022 23:43:21 -0500 Subject: [PATCH 3/4] Prevent Sphinx build warning --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 6f6412a5..b492c1b7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -134,7 +134,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +#html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied From 094f064eec071dd99922daa707fc5d687c73b1bf Mon Sep 17 00:00:00 2001 From: Alex Hedges Date: Sat, 12 Mar 2022 23:43:56 -0500 Subject: [PATCH 4/4] Move mypy config from tox.ini to pyproject.toml --- pyproject.toml | 5 +++++ tox.ini | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c6e2fb8e..7fc3e2e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,3 +7,8 @@ skip-string-normalization = true profile = "black" src_paths = ["src/pydocstyle"] line_length = 79 + +[tool.mypy] +ignore_missing_imports = true +strict_optional = true +disallow_incomplete_defs = true diff --git a/tox.ini b/tox.ini index ca1869f0..d557f665 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ setenv = # To pass arguments to pytest, use `tox [options] -- [pytest posargs]`. commands = pytest --cache-clear -vv src/tests {posargs} - mypy --config-file=tox.ini src/ + mypy src/ black --check src/pydocstyle isort --check src/pydocstyle deps = @@ -73,8 +73,3 @@ addopts = -rw inherit = false convention = pep257 add-select = D404 - -[mypy] -ignore_missing_imports = true -strict_optional = true -disallow_incomplete_defs = true