mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix flake8 violations
This commit is contained in:
parent
938ba386ed
commit
4073d4e850
@ -309,7 +309,6 @@ class GoogleDocstringTest(BaseDocstringTest):
|
||||
).format(admonition)
|
||||
self.assertEqual(expect, actual)
|
||||
|
||||
|
||||
def test_docstrings(self):
|
||||
config = Config(
|
||||
napoleon_use_param=False,
|
||||
@ -967,21 +966,21 @@ Parameters:
|
||||
|
||||
def test_custom_generic_sections(self):
|
||||
|
||||
docstrings=("""\
|
||||
docstrings = (("""\
|
||||
Really Important Details:
|
||||
You should listen to me!
|
||||
""",
|
||||
""".. rubric:: Really Important Details
|
||||
""", """.. rubric:: Really Important Details
|
||||
|
||||
You should listen to me!
|
||||
"""),\
|
||||
"""),
|
||||
("""\
|
||||
Sooper Warning:
|
||||
Stop hitting yourself!
|
||||
""",""":Warns: **Stop hitting yourself!**
|
||||
""")
|
||||
""", """:Warns: **Stop hitting yourself!**
|
||||
"""))
|
||||
|
||||
testConfig=Config(napoleon_custom_sections=['Really Important Details',('Sooper Warning','warns')])
|
||||
testConfig = Config(napoleon_custom_sections=['Really Important Details',
|
||||
('Sooper Warning', 'warns')])
|
||||
|
||||
for docstring, expected in docstrings:
|
||||
actual = str(GoogleDocstring(docstring, testConfig))
|
||||
@ -1163,7 +1162,7 @@ class NumpyDocstringTest(BaseDocstringTest):
|
||||
" this is the first line\n"
|
||||
"\n"
|
||||
" and this is the second line\n"
|
||||
).format(section, '-'*len(section)), config))
|
||||
).format(section, '-' * len(section)), config))
|
||||
expect = (".. {}::\n"
|
||||
"\n"
|
||||
" this is the first line\n"
|
||||
@ -1176,7 +1175,7 @@ class NumpyDocstringTest(BaseDocstringTest):
|
||||
actual = str(NumpyDocstring(("{}\n"
|
||||
"{}\n"
|
||||
" this is a single line\n"
|
||||
).format(section, '-'*len(section)), config))
|
||||
).format(section, '-' * len(section)), config))
|
||||
expect = (".. {}:: this is a single line\n"
|
||||
).format(admonition)
|
||||
self.assertEqual(expect, actual)
|
||||
|
Loading…
Reference in New Issue
Block a user