|
From: <aa-...@us...> - 2022-10-20 17:15:42
|
Revision: 9127
http://sourceforge.net/p/docutils/code/9127
Author: aa-turner
Date: 2022-10-20 17:15:40 +0000 (Thu, 20 Oct 2022)
Log Message:
-----------
Resolve flake8 ``E275`` error
E275: missing whitespace after keyword
Modified Paths:
--------------
trunk/docutils/docutils/parsers/rst/__init__.py
trunk/docutils/docutils/transforms/universal.py
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/xetex/__init__.py
trunk/docutils/test/test_CLI.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_code.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py
trunk/docutils/test/test_parsers/test_rst/test_interpreted.py
trunk/docutils/test/test_viewlist.py
Modified: trunk/docutils/docutils/parsers/rst/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/__init__.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/docutils/parsers/rst/__init__.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -384,7 +384,7 @@
if 'name' in self.options:
name = nodes.fully_normalize_name(self.options.pop('name'))
if 'name' in node:
- del(node['name'])
+ del node['name']
node['names'].append(name)
self.state.document.note_explicit_target(node, node)
Modified: trunk/docutils/docutils/transforms/universal.py
===================================================================
--- trunk/docutils/docutils/transforms/universal.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/docutils/transforms/universal.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -153,7 +153,7 @@
if node['level'] < self.document.reporter.report_level:
node.parent.remove(node)
try: # also remove id-entry
- del(self.document.ids[node['ids'][0]])
+ del self.document.ids[node['ids'][0]]
except (IndexError):
pass
for node in tuple(self.document.findall(nodes.problematic)):
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/docutils/writers/_html_base.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -544,7 +544,7 @@
self.body.append(self.context.pop() + '</p>\n')
def visit_author(self, node):
- if not(isinstance(node.parent, nodes.authors)):
+ if not isinstance(node.parent, nodes.authors):
self.visit_docinfo_item(node, 'author')
self.body.append('<p>')
@@ -1257,11 +1257,11 @@
elif converter == 'blahtexml':
math_code = tex2mathml_extern.blahtexml(
math_code,
- inline=not(math_env),
+ inline=(not math_env),
reporter=self.document.reporter)
elif not converter:
math_code = latex2mathml.tex2mathml(
- math_code, inline=not(math_env))
+ math_code, inline=(not math_env))
else:
self.document.reporter.error('option "%s" not supported '
'with math-output "MathML"')
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -319,7 +319,7 @@
and isinstance(node.parent, nodes.literal_block)
and 'code' in node.parent.get('classes')):
if self.body[-1] == '<code>':
- del(self.body[-1])
+ del self.body[-1]
else:
self.body.append('</code>')
node.html5tagname = 'small'
@@ -424,7 +424,7 @@
atts = {'classes': ['topic']}
if 'contents' in node['classes']:
node.html_tagname = 'nav'
- del(atts['classes'])
+ del atts['classes']
if isinstance(node.parent, nodes.document):
atts['role'] = 'doc-toc'
self.body_prefix[0] = '</head>\n<body class="with-toc">\n'
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -1488,7 +1488,7 @@
table.update(CharMaps.special)
# keep the underscore in citation references
if self.inside_citation_reference_label and not self.alltt:
- del(table[ord('_')])
+ del table[ord('_')]
# Workarounds for OT1 font-encoding
if self.font_encoding in ['OT1', ''] and not self.is_xetex:
# * out-of-order characters in cmtt
@@ -3168,7 +3168,7 @@
'chapter': 'mini',
'section': 'sect'}
if 'chapter' in self.d_class.sections:
- del(minitoc_names['section'])
+ del minitoc_names['section']
try:
mtc_name = minitoc_names[section_name]
except KeyError:
Modified: trunk/docutils/docutils/writers/xetex/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/xetex/__init__.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/docutils/writers/xetex/__init__.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -108,7 +108,7 @@
'grc-ibycus', # 'ibycus', (Greek Ibycus encoding)
'sr-Latn', # 'serbian script=latin'
):
- del(language_codes[key.lower()])
+ del language_codes[key.lower()]
def __init__(self, language_code, reporter):
self.language_code = language_code
Modified: trunk/docutils/test/test_CLI.py
===================================================================
--- trunk/docutils/test/test_CLI.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/test/test_CLI.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -10,7 +10,7 @@
#
# .. _2-Clause BSD license: https://opensource.org/licenses/BSD-2-Clause
-# :Id: $Id: $
+# :Id: $Id$
"""
Test module for the command line interface.
@@ -46,7 +46,7 @@
sys.stdout = StringIO() # re-direct sys.stdout
def tearDown(self):
- del(os.environ['DOCUTILSCONFIG'])
+ del os.environ['DOCUTILSCONFIG']
sys.stdout = self.orig_stdout
sys.argv = self.orig_argv
locale.setlocale(locale.LC_ALL, 'C') # restore default (C) locale
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_code.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_code.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_code.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -17,7 +17,7 @@
def suite():
s = DocutilsTestSupport.ParserTestSuite()
if not with_pygments:
- del(totest['code-parsing'])
+ del totest['code-parsing']
s.generateTests(totest)
return s
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -26,9 +26,9 @@
s = DocutilsTestSupport.ParserTestSuite()
# eventually skip optional parts:
if not with_pygments:
- del(totest['include-code'])
+ del totest['include-code']
if not md_parser_class:
- del(totest['include-markdown'])
+ del totest['include-markdown']
s.generateTests(totest)
return s
Modified: trunk/docutils/test/test_parsers/test_rst/test_interpreted.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_interpreted.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/test/test_parsers/test_rst/test_interpreted.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -17,7 +17,7 @@
def suite():
s = DocutilsTestSupport.ParserTestSuite()
if not with_pygments:
- del(totest['code-parsing'])
+ del totest['code-parsing']
s.generateTests(totest)
return s
Modified: trunk/docutils/test/test_viewlist.py
===================================================================
--- trunk/docutils/test/test_viewlist.py 2022-10-11 19:03:00 UTC (rev 9126)
+++ trunk/docutils/test/test_viewlist.py 2022-10-20 17:15:40 UTC (rev 9127)
@@ -54,7 +54,7 @@
self.assertEqual(repr(self.a), "ViewList(%s, items=%s)" %
(repr(self.a_list), repr(self.a.items)))
# `del` also deletes meta-data:
- del(self.c[1])
+ del self.c[1]
self.assertEqual(list(self.c.xitems()),
[('c', 0, 'X'), ('c', 2, 'Z')])
# operators with extended behaviour
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|