|
From: <mi...@us...> - 2022-03-03 22:16:26
|
Revision: 9019
http://sourceforge.net/p/docutils/code/9019
Author: milde
Date: 2022-03-03 22:16:23 +0000 (Thu, 03 Mar 2022)
Log Message:
-----------
Fix multiple spaces after ',' or ':'.
flake rule E241.
Allow exception for data collections where this facilitates
editing and comprehension.
Modified Paths:
--------------
trunk/docutils/docutils/languages/he.py
trunk/docutils/docutils/languages/sv.py
trunk/docutils/docutils/statemachine.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/docutils/utils/punctuation_chars.py
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/test/test_dependencies.py
trunk/docutils/tox.ini
Modified: trunk/docutils/docutils/languages/he.py
===================================================================
--- trunk/docutils/docutils/languages/he.py 2022-03-03 22:16:12 UTC (rev 9018)
+++ trunk/docutils/docutils/languages/he.py 2022-03-03 22:16:23 UTC (rev 9019)
@@ -19,7 +19,7 @@
'authors': '\u05de\u05d7\u05d1\u05e8\u05d9',
'organization': '\u05d0\u05e8\u05d2\u05d5\u05df',
'address': '\u05db\u05ea\u05d5\u05d1\u05ea',
- 'contact': '\u05d0\u05d9\u05e9 \u05e7\u05e9\u05e8',
+ 'contact': '\u05d0\u05d9\u05e9 \u05e7\u05e9\u05e8',
'version': '\u05d2\u05e8\u05e1\u05d4',
'revision': '\u05de\u05d4\u05d3\u05d5\u05e8\u05d4',
'status': '\u05e1\u05d8\u05d8\u05d5\u05e1',
Modified: trunk/docutils/docutils/languages/sv.py
===================================================================
--- trunk/docutils/docutils/languages/sv.py 2022-03-03 22:16:12 UTC (rev 9018)
+++ trunk/docutils/docutils/languages/sv.py 2022-03-03 22:16:23 UTC (rev 9019)
@@ -14,44 +14,44 @@
__docformat__ = 'reStructuredText'
labels = {
- 'author': 'Författare',
- 'authors': 'Författare',
+ 'author': 'Författare',
+ 'authors': 'Författare',
'organization': 'Organisation',
- 'address': 'Adress',
- 'contact': 'Kontakt',
- 'version': 'Version',
- 'revision': 'Revision',
- 'status': 'Status',
- 'date': 'Datum',
- 'copyright': 'Copyright',
- 'dedication': 'Dedikation',
- 'abstract': 'Sammanfattning',
- 'attention': 'Observera!',
- 'caution': 'Akta!', # 'Varning' already used for 'warning'
- 'danger': 'FARA!',
- 'error': 'Fel',
- 'hint': 'Vink',
- 'important': 'Viktigt',
- 'note': 'Notera',
- 'tip': 'Tips',
- 'warning': 'Varning',
- 'contents': 'Innehåll'}
+ 'address': 'Adress',
+ 'contact': 'Kontakt',
+ 'version': 'Version',
+ 'revision': 'Revision',
+ 'status': 'Status',
+ 'date': 'Datum',
+ 'copyright': 'Copyright',
+ 'dedication': 'Dedikation',
+ 'abstract': 'Sammanfattning',
+ 'attention': 'Observera!',
+ 'caution': 'Akta!', # 'Varning' already used for 'warning'
+ 'danger': 'FARA!',
+ 'error': 'Fel',
+ 'hint': 'Vink',
+ 'important': 'Viktigt',
+ 'note': 'Notera',
+ 'tip': 'Tips',
+ 'warning': 'Varning',
+ 'contents': 'Innehåll'}
"""Mapping of node class name to label text."""
bibliographic_fields = {
# 'Author' and 'Authors' identical in Swedish; assume the plural:
'författare': 'authors',
- ' n/a': 'author',
- 'organisation': 'organization',
- 'adress': 'address',
- 'kontakt': 'contact',
- 'version': 'version',
- 'revision': 'revision',
- 'status': 'status',
- 'datum': 'date',
- 'copyright': 'copyright',
- 'dedikation': 'dedication',
- 'sammanfattning': 'abstract'}
+ ' n/a': 'author',
+ 'organisation': 'organization',
+ 'adress': 'address',
+ 'kontakt': 'contact',
+ 'version': 'version',
+ 'revision': 'revision',
+ 'status': 'status',
+ 'datum': 'date',
+ 'copyright': 'copyright',
+ 'dedikation': 'dedication',
+ 'sammanfattning': 'abstract'}
"""Swedish (lowcased) to canonical name mapping for bibliographic fields."""
author_separators = [';', ',']
Modified: trunk/docutils/docutils/statemachine.py
===================================================================
--- trunk/docutils/docutils/statemachine.py 2022-03-03 22:16:12 UTC (rev 9018)
+++ trunk/docutils/docutils/statemachine.py 2022-03-03 22:16:23 UTC (rev 9019)
@@ -1128,7 +1128,7 @@
def __getitem__(self, i):
if isinstance(i, slice):
- assert i.step in (None, 1), 'cannot handle slice with stride'
+ assert i.step in (None, 1), 'cannot handle slice with stride'
return self.__class__(self.data[i.start:i.stop],
items=self.items[i.start:i.stop],
parent=self, parent_offset=i.start or 0)
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2022-03-03 22:16:12 UTC (rev 9018)
+++ trunk/docutils/docutils/utils/__init__.py 2022-03-03 22:16:23 UTC (rev 9019)
@@ -749,10 +749,10 @@
release_level_abbreviations = {
- 'alpha': 'a',
- 'beta': 'b',
+ 'alpha': 'a',
+ 'beta': 'b',
'candidate': 'rc',
- 'final': ''}
+ 'final': ''}
def version_identifier(version_info=None):
"""
Modified: trunk/docutils/docutils/utils/punctuation_chars.py
===================================================================
--- trunk/docutils/docutils/utils/punctuation_chars.py 2022-03-03 22:16:12 UTC (rev 9018)
+++ trunk/docutils/docutils/utils/punctuation_chars.py 2022-03-03 22:16:23 UTC (rev 9019)
@@ -94,7 +94,7 @@
# --------------------------
quote_pairs = {# open char: matching closing characters # usage example
- u'\xbb': u'\xbb', # » » Swedish
+ u'\xbb': u'\xbb', # » » Swedish
u'\u2018': u'\u201a', # ‘ ‚ Albanian/Greek/Turkish
u'\u2019': u'\u2019', # ’ ’ Swedish
u'\u201a': u'\u2018\u2019', # ‚ ‘ German ‚ ’ Polish
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2022-03-03 22:16:12 UTC (rev 9018)
+++ trunk/docutils/docutils/writers/_html_base.py 2022-03-03 22:16:23 UTC (rev 9019)
@@ -1178,10 +1178,10 @@
# HTML and MathML also convert the math_code.
# HTML container
math_tags = {# math_output: (block, inline, class-arguments)
- 'mathml': ('div', '', ''),
- 'html': ('div', 'span', 'formula'),
- 'mathjax': ('div', 'span', 'math'),
- 'latex': ('pre', 'tt', 'math'),
+ 'html': ('div', 'span', 'formula'),
+ 'latex': ('pre', 'tt', 'math'),
+ 'mathml': ('div', '', ''),
+ 'mathjax': ('div', 'span', 'math'),
}
def visit_math(self, node, math_env=''):
@@ -1196,10 +1196,10 @@
clsarg = self.math_tags[self.math_output][2]
# LaTeX container
wrappers = {# math_mode: (inline, block)
- 'mathml': ('$%s$', '\\begin{%s}\n%s\n\\end{%s}'),
- 'html': ('$%s$', '\\begin{%s}\n%s\n\\end{%s}'),
+ 'html': ('$%s$', '\\begin{%s}\n%s\n\\end{%s}'),
+ 'latex': (None, None),
+ 'mathml': ('$%s$', '\\begin{%s}\n%s\n\\end{%s}'),
'mathjax': (r'\(%s\)', '\\begin{%s}\n%s\n\\end{%s}'),
- 'latex': (None, None),
}
wrapper = wrappers[self.math_output][math_env != '']
if (self.math_output == 'mathml'
Modified: trunk/docutils/test/test_dependencies.py
===================================================================
--- trunk/docutils/test/test_dependencies.py 2022-03-03 22:16:12 UTC (rev 9018)
+++ trunk/docutils/test/test_dependencies.py 2022-03-03 22:16:23 UTC (rev 9019)
@@ -19,10 +19,10 @@
# docutils.utils.DependencyList records POSIX paths,
# i.e. "/" as a path separator even on Windows (not os.path.join).
paths = {'include': 'data/include.txt', # included rst file
- 'raw': 'data/raw.txt', # included raw "HTML file"
+ 'raw': 'data/raw.txt', # included raw "HTML file"
'scaled-image': '../docs/user/rst/images/biohazard.png',
'figure-image': '../docs/user/rst/images/title.png',
- 'stylesheet': 'data/stylesheet.txt',
+ 'stylesheet': 'data/stylesheet.txt',
}
# avoid latex writer future warnings:
Modified: trunk/docutils/tox.ini
===================================================================
--- trunk/docutils/tox.ini 2022-03-03 22:16:12 UTC (rev 9018)
+++ trunk/docutils/tox.ini 2022-03-03 22:16:23 UTC (rev 9019)
@@ -38,8 +38,6 @@
# whitespace around the operators with the lowest priority(ies).
# Use your own judgment; …"
- #E231, # missing whitespace after ','
- E241, # multiple spaces after ':'
E251, # unexpected spaces around keyword / parameter equals
E261, # at least two spaces before inline comment
E262, # inline comment should start with '# '
@@ -81,10 +79,17 @@
# complex regexp definitions
docutils/parsers/rst/states.py:E121,E128
# module with 3rd-party origin
- docutils/utils/math/math2html.py:E111,E114,E123 # leave indentation for now
+ docutils/utils/math/math2html.py:E111,E114,E123,E241
# generated auxiliary files
docutils/utils/math/unichar2tex.py:E122
docutils/utils/math/tex2unichar.py:E123
+ # allow aligning values in data-collections
+ docutils/utils/smartquotes.py:E241
+ docutils/utils/roman.py:E241
+ docutils/utils/math/latex2mathml.py:E241
+ docutils/writers/latex2e/__init__.py:E241
+ docutils/writers/xetex/__init__.py:E241
+
# included configuration files referencing externally defined variables
test/functional/tests/*:F821
# don't indent list delimiters in lists of test samples (multi-line strings)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|