mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix PT007 (use lists in `pytest.mark.parametrize`)
This commit is contained in:
@@ -223,7 +223,6 @@ ignore = [
|
||||
"PLW2901", # outer loop variable overwritten by inner assignment
|
||||
# flake8-pytest-style
|
||||
"PT003", # `scope='function'` is implied in `@pytest.fixture()`
|
||||
"PT007", # wrong values type in `@pytest.mark.parametrize`
|
||||
"PT011", # `pytest.raises(ValueError)` is too broad, set the `match` parameter
|
||||
# flake8-use-pathlib
|
||||
"PTH",
|
||||
|
||||
@@ -1453,7 +1453,7 @@ def test_warn_missing_reference(app, status, warning):
|
||||
|
||||
|
||||
@pytest.mark.sphinx(confoverrides={'nitpicky': True})
|
||||
@pytest.mark.parametrize('include_options', (True, False))
|
||||
@pytest.mark.parametrize('include_options', [True, False])
|
||||
def test_signature_line_number(app, include_options):
|
||||
text = (".. py:function:: foo(bar : string)\n" +
|
||||
(" :no-index-entry:\n" if include_options else ""))
|
||||
|
||||
@@ -2592,11 +2592,11 @@ definition_after_normal_text : int
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("name", "expected"),
|
||||
(
|
||||
[
|
||||
("x, y, z", "x, y, z"),
|
||||
("*args, **kwargs", r"\*args, \*\*kwargs"),
|
||||
("*x, **y", r"\*x, \*\*y"),
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_escape_args_and_kwargs(self, name, expected):
|
||||
numpy_docstring = NumpyDocstring("")
|
||||
|
||||
Reference in New Issue
Block a user