Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 03404c8

Browse files
authored
Fix test warnings and improve lint configuration (#584)
1 parent 187bac7 commit 03404c8

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
# Add any paths that contain custom static files (such as style sheets) here,
135135
# relative to this directory. They are copied after the builtin static files,
136136
# so a file named "default.css" will overwrite the builtin "default.css".
137-
html_static_path = ['_static']
137+
#html_static_path = ['_static']
138138

139139
# Add any extra paths that contain custom files (such as robots.txt or
140140
# .htaccess) here, relative to this directory. These files are copied

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ skip-string-normalization = true
77
profile = "black"
88
src_paths = ["src/pydocstyle"]
99
line_length = 79
10+
11+
[tool.mypy]
12+
ignore_missing_imports = true
13+
strict_optional = true
14+
disallow_incomplete_defs = true

src/tests/test_integration.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def __exit__(self, *args, **kwargs):
121121
pass
122122

123123

124-
@pytest.yield_fixture(scope="module")
124+
@pytest.fixture(scope="module")
125125
def install_package(request):
126126
"""Install the package in development mode for the tests.
127127
@@ -138,7 +138,7 @@ def install_package(request):
138138
)
139139

140140

141-
@pytest.yield_fixture(scope="function", params=['ini', 'toml'])
141+
@pytest.fixture(scope="function", params=['ini', 'toml'])
142142
def env(request):
143143
"""Add a testing environment to a test method."""
144144
sandbox_settings = {

tox.ini

+1-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ setenv =
1616
# To pass arguments to pytest, use `tox [options] -- [pytest posargs]`.
1717
commands =
1818
pytest --cache-clear -vv src/tests {posargs}
19-
mypy --config-file=tox.ini src/
19+
mypy src/
2020
black --check src/pydocstyle
2121
isort --check src/pydocstyle
2222
deps =
@@ -66,17 +66,10 @@ skip_install = {[testenv:install]skip_install}
6666
commands = {[testenv:install]commands}
6767

6868
[pytest]
69-
pep8ignore =
70-
test.py E701 E704
7169
norecursedirs = docs .tox
7270
addopts = -rw
7371

7472
[pep257]
7573
inherit = false
7674
convention = pep257
7775
add-select = D404
78-
79-
[mypy]
80-
ignore_missing_imports = true
81-
strict_optional = true
82-
disallow_incomplete_defs = true

0 commit comments

Comments
 (0)