diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-01-29 13:20:04 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-01-29 13:20:04 +0000 |
| commit | fbf6ed81005614eb13e3db1c6c53f565cb22ef44 (patch) | |
| tree | 2102a8d4821350ae2574bdb17416b631d5a449f2 /docutils | |
| parent | 18adf7e32ab747518427a1fabaa4981d701a2498 (diff) | |
| download | docutils-fbf6ed81005614eb13e3db1c6c53f565cb22ef44.tar.gz | |
Fix trailing whitespace (flake warnings W293, W391).
W293 blank line contains whitespace
W391 blank line at end of file
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8993 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
20 files changed, 18 insertions, 34 deletions
diff --git a/docutils/docutils/languages/pl.py b/docutils/docutils/languages/pl.py index 33b919294..a268041f0 100644 --- a/docutils/docutils/languages/pl.py +++ b/docutils/docutils/languages/pl.py @@ -58,5 +58,3 @@ bibliographic_fields = { author_separators = [';', ','] """List of separator strings for the 'Authors' bibliographic field. Tried in order.""" - - diff --git a/docutils/docutils/parsers/rst/__init__.py b/docutils/docutils/parsers/rst/__init__.py index 472e87519..ccfb954d0 100644 --- a/docutils/docutils/parsers/rst/__init__.py +++ b/docutils/docutils/parsers/rst/__init__.py @@ -272,7 +272,7 @@ class Directive: - ``state_machine`` is the state machine which controls the state which called the directive function. - + - ``reporter`` is the state machine's `reporter` instance. Directive functions return a list of nodes which will be inserted diff --git a/docutils/docutils/parsers/rst/directives/__init__.py b/docutils/docutils/parsers/rst/directives/__init__.py index 994002db6..0e5f0fe26 100644 --- a/docutils/docutils/parsers/rst/directives/__init__.py +++ b/docutils/docutils/parsers/rst/directives/__init__.py @@ -407,7 +407,7 @@ def format_values(values): def value_or(values, other): """ Directive option conversion function. - + The argument can be any of `values` or `argument_type`. """ def auto_or_other(argument): diff --git a/docutils/docutils/parsers/rst/directives/parts.py b/docutils/docutils/parsers/rst/directives/parts.py index 2eb1efddd..b7b8dfb39 100644 --- a/docutils/docutils/parsers/rst/directives/parts.py +++ b/docutils/docutils/parsers/rst/directives/parts.py @@ -41,7 +41,7 @@ class Contents(Directive): 'local': directives.flag, 'backlinks': backlinks, 'class': directives.class_option} - + def run(self): if not (self.state_machine.match_titles or isinstance(self.state_machine.node, nodes.sidebar)): diff --git a/docutils/docutils/parsers/rst/languages/pl.py b/docutils/docutils/parsers/rst/languages/pl.py index 8994eab0b..ec01c9ed3 100644 --- a/docutils/docutils/parsers/rst/languages/pl.py +++ b/docutils/docutils/parsers/rst/languages/pl.py @@ -97,6 +97,3 @@ roles = { 'surowe': 'raw',} """Mapping of Polish role names to canonical role names for interpreted text. """ - - - diff --git a/docutils/docutils/transforms/frontmatter.py b/docutils/docutils/transforms/frontmatter.py index 9575277d0..fc44c56ca 100644 --- a/docutils/docutils/transforms/frontmatter.py +++ b/docutils/docutils/transforms/frontmatter.py @@ -503,7 +503,7 @@ class DocInfo(Transform): def authors_from_one_paragraph(self, field): """Return list of Text nodes with author names in `field`. - + Author names must be separated by one of the "autor separators" defined for the document language (default: ";" or ","). """ diff --git a/docutils/docutils/transforms/writer_aux.py b/docutils/docutils/transforms/writer_aux.py index 9ca89727a..c9b58f5cb 100644 --- a/docutils/docutils/transforms/writer_aux.py +++ b/docutils/docutils/transforms/writer_aux.py @@ -25,7 +25,7 @@ class Compound(Transform): """ .. warning:: This transform is not used by Docutils since Dec 2010 and will be removed in Docutils 0.21 or later. - + Flatten all compound paragraphs. For example, transform :: <compound> @@ -41,7 +41,7 @@ class Compound(Transform): """ default_priority = 910 - + def __init__(self, document, startnode=None): warnings.warn('docutils.transforms.writer_aux.Compound is deprecated' ' and will be removed in Docutils 0.21 or later.', diff --git a/docutils/docutils/utils/roman.py b/docutils/docutils/utils/roman.py index dce927fba..bcf0fe825 100644 --- a/docutils/docutils/utils/roman.py +++ b/docutils/docutils/utils/roman.py @@ -79,4 +79,3 @@ def fromRoman(s): result += integer index += len(numeral) return result - diff --git a/docutils/docutils/writers/pseudoxml.py b/docutils/docutils/writers/pseudoxml.py index 61446a9e1..3742e0787 100644 --- a/docutils/docutils/writers/pseudoxml.py +++ b/docutils/docutils/writers/pseudoxml.py @@ -16,7 +16,7 @@ class Writer(writers.Writer): supported = ('pprint', 'pformat', 'pseudoxml') """Formats this writer supports.""" - + settings_spec = ( '"Docutils pseudo-XML" Writer Options', None, diff --git a/docutils/test/functional/tests/math_output_html.py b/docutils/test/functional/tests/math_output_html.py index 0f837eaae..cca0af8a8 100644 --- a/docutils/test/functional/tests/math_output_html.py +++ b/docutils/test/functional/tests/math_output_html.py @@ -12,5 +12,3 @@ settings_overrides['math_output'] = 'HTML math.css' # local copy of stylesheets: # (Test runs in ``docutils/test/``, we need relative path from there.) settings_overrides['stylesheet_dirs'] = ('.', 'functional/input/data') - - diff --git a/docutils/test/functional/tests/math_output_latex.py b/docutils/test/functional/tests/math_output_latex.py index a9d454659..09b0819ec 100644 --- a/docutils/test/functional/tests/math_output_latex.py +++ b/docutils/test/functional/tests/math_output_latex.py @@ -12,5 +12,3 @@ settings_overrides['math_output'] = 'latex' # local copy of stylesheets: # (Test runs in ``docutils/test/``, we need relative path from there.) settings_overrides['stylesheet_dirs'] = ('.', 'functional/input/data') - - diff --git a/docutils/test/local-writer.py b/docutils/test/local-writer.py index 11302e163..891bb9273 100644 --- a/docutils/test/local-writer.py +++ b/docutils/test/local-writer.py @@ -33,5 +33,3 @@ class Writer(writers.Writer): class Translator(nodes.NodeVisitor): def __init__(self, document): nodes.NodeVisitor.__init__(self, document) - - diff --git a/docutils/test/test_io.py b/docutils/test/test_io.py index 74a78d0ed..d20995dea 100755 --- a/docutils/test/test_io.py +++ b/docutils/test/test_io.py @@ -65,7 +65,7 @@ class HelperTests(unittest.TestCase): self.assertEqual(io.check_encoding(mock_stdout, None), None) # encoding is invalid self.assertEqual(io.check_encoding(mock_stdout, 'UTF-9'), None) - + def test_error_string(self): us = '\xfc' # bytes(us) fails bs = b'\xc3\xbc' # str(bs) returns repr(bs) @@ -77,7 +77,7 @@ class HelperTests(unittest.TestCase): self.assertEqual('ImportError: %s' % us, io.error_string(ImportError(us))) - + class InputTests(unittest.TestCase): diff --git a/docutils/test/test_parsers/test_get_parser_class.py b/docutils/test/test_parsers/test_get_parser_class.py index ec7083189..fec6a2bab 100644 --- a/docutils/test/test_parsers/test_get_parser_class.py +++ b/docutils/test/test_parsers/test_get_parser_class.py @@ -31,4 +31,3 @@ class GetParserClassTestCase(DocutilsTestSupport.StandardTestCase): if __name__ == '__main__': import unittest unittest.main() - diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_de.py b/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_de.py index de8bc4336..b8f201689 100644 --- a/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_de.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_de.py @@ -211,7 +211,7 @@ totest['admonitions'] = [ 1 argument(s) required, 0 supplied. <literal_block xml:space="preserve"> .. admonition:: - + \n\ Generic admonitions require a title. """], ] diff --git a/docutils/test/test_transforms/test_sectnum.py b/docutils/test/test_transforms/test_sectnum.py index 1c5e3822a..279b21479 100755 --- a/docutils/test/test_transforms/test_sectnum.py +++ b/docutils/test/test_transforms/test_sectnum.py @@ -272,7 +272,7 @@ Paragraph 4. ["""\ .. sectnum:: :start: 3 - + \n\ Title 1 ======= Paragraph 1. @@ -325,7 +325,7 @@ Paragraph 4. :prefix: (5.9. :suffix: ) :start: 3 - + \n\ Title 1 ======= Paragraph 1. diff --git a/docutils/test/test_transforms/test_smartquotes.py b/docutils/test/test_transforms/test_smartquotes.py index 09b7e6c9f..98477e341 100644 --- a/docutils/test/test_transforms/test_smartquotes.py +++ b/docutils/test/test_transforms/test_smartquotes.py @@ -98,10 +98,10 @@ Keep quotes straight in code and math: Keep quotes straight in code and math: <literal classes="code"> print "hello" - + \n\ <literal classes="code python"> print("hello") - + \n\ <math> 1' 12" . diff --git a/docutils/test/test_transforms/test_strip_elements_with_class.py b/docutils/test/test_transforms/test_strip_elements_with_class.py index 0be7b718f..47827b36b 100644 --- a/docutils/test/test_transforms/test_strip_elements_with_class.py +++ b/docutils/test/test_transforms/test_strip_elements_with_class.py @@ -38,9 +38,9 @@ this is ham .. code:: :class: spam - + \n\ print("spam") - + \n\ .. image:: spam.jpg :class: spam diff --git a/docutils/tools/rst2odt.py b/docutils/tools/rst2odt.py index b067dab54..2e1534b22 100755 --- a/docutils/tools/rst2odt.py +++ b/docutils/tools/rst2odt.py @@ -26,4 +26,3 @@ writer = Writer() reader = Reader() output = publish_cmdline_to_binary(reader=reader, writer=writer, description=description) - diff --git a/docutils/tox.ini b/docutils/tox.ini index eb5007072..dce99605b 100644 --- a/docutils/tox.ini +++ b/docutils/tox.ini @@ -92,17 +92,15 @@ commands = # E999 SyntaxError: invalid syntax # F404 from __future__ imports must occur at the beginning of the file # F821 undefined name 'foo' -ignore = E101,E111,E114,E115,E116,E117,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E201,E202,E203,E211,E221,E222,E225,E226,E228,E231,E241,E251,E261,E262,E265,E266,E271,E301,E302,E303,E305,E306,E401,E402,E501,E502,E701,E704,E711,E713,E721,E722,E731,E741,W191,W293,W391,W503,W504,W605,F401,F841 +ignore = E101,E111,E114,E115,E116,E117,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E201,E202,E203,E211,E221,E222,E225,E226,E228,E231,E241,E251,E261,E262,E265,E266,E271,E301,E302,E303,E305,E306,E401,E402,E501,E502,E701,E704,E711,E713,E721,E722,E731,E741,W503,W504,W605,F401,F841 exclude = .venv,.tox,dist,*egg,build max-complexity = 35 # Some rules are disabled for specific files (requires flake8 3.7.0) -# -# F821, disabled due to use of 'settings_overrides' per-file-ignores = test/functional/tests/*:F821 # included config files test/test_readers/test_pep/*:E122,E128 test/test_parsers/*:E122,E124,E128 test/test_writers/*:E122,E124,E128 test/test_writers/test_manpage.py:E121,E128,W291 - test/test_writers/test_latex2e.py:E122,E128,W291 # r'' test samples + test/test_writers/test_latex2e.py:E122,E128,W291,W293 # r'' test samples test/test_transforms/*:E122,E124,E128 |
