diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-03-04 15:54:22 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-03-04 15:54:22 +0000 |
| commit | e61bd1ea93dcbc0ceaba0c8fbb3312c54efaaa0a (patch) | |
| tree | 9a3d67e207c783186d97a8500034c556044c53d5 /docutils/tools | |
| parent | fb90874a991c64da4340b1f09badbf846ba6152b (diff) | |
| download | docutils-e61bd1ea93dcbc0ceaba0c8fbb3312c54efaaa0a.tar.gz | |
Ensure at least two spaces before inline comment.
flake 8 rule E261
Exceptions for modules sheduled for removal or with
3rd-party origin and for data collections.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9021 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/tools')
| -rwxr-xr-x | docutils/tools/buildhtml.py | 2 | ||||
| -rw-r--r-- | docutils/tools/dev/generate_punctuation_chars.py | 16 | ||||
| -rwxr-xr-x | docutils/tools/docutils-cli.py | 6 | ||||
| -rwxr-xr-x | docutils/tools/quicktest.py | 6 | ||||
| -rwxr-xr-x | docutils/tools/rst2html5.py | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/docutils/tools/buildhtml.py b/docutils/tools/buildhtml.py index 7fe83a424..a30daa180 100755 --- a/docutils/tools/buildhtml.py +++ b/docutils/tools/buildhtml.py @@ -82,7 +82,7 @@ class SettingsSpec(docutils.SettingsSpec): 'choices': ['html', 'html4', 'html5'], # 'default': 'html' (set below) }), - (frontend.SUPPRESS_HELP, # Obsoleted by "--writer" + (frontend.SUPPRESS_HELP, # Obsoleted by "--writer" ['--html-writer'], {'metavar': '<writer>', 'choices': ['html', 'html4', 'html5']}), diff --git a/docutils/tools/dev/generate_punctuation_chars.py b/docutils/tools/dev/generate_punctuation_chars.py index a73f37e41..9a2795ff4 100644 --- a/docutils/tools/dev/generate_punctuation_chars.py +++ b/docutils/tools/dev/generate_punctuation_chars.py @@ -134,12 +134,12 @@ def match_chars(c1, c2): # :: unicode_punctuation_categories = { - # 'Pc': 'Connector', # not used in Docutils inline markup recognition + # 'Pc': 'Connector', # not used in Docutils inline markup recognition 'Pd': 'Dash', 'Ps': 'Open', 'Pe': 'Close', - 'Pi': 'Initial quote', # may behave like Ps or Pe depending on usage - 'Pf': 'Final quote', # may behave like Ps or Pe depending on usage + 'Pi': 'Initial quote', # may behave like Ps or Pe depending on usage + 'Pf': 'Final quote', # may behave like Ps or Pe depending on usage 'Po': 'Other' } """Unicode character categories for punctuation""" @@ -189,7 +189,7 @@ def character_category_patterns(): recognition rules`_. """ - cp_min = 160 # ASCII chars have special rules for backwards compatibility + cp_min = 160 # ASCII chars have special rules for backwards compatibility ucharlists = unicode_charlists(unicode_punctuation_categories, cp_min) """Strings of characters in Unicode punctuation character categories""" @@ -200,12 +200,12 @@ def character_category_patterns(): # low quotation marks are also used as closers (e.g. in Greek) # move them to category Pi: - ucharlists['Ps'].remove('‚') # 201A SINGLE LOW-9 QUOTATION MARK - ucharlists['Ps'].remove('„') # 201E DOUBLE LOW-9 QUOTATION MARK + ucharlists['Ps'].remove('‚') # 201A SINGLE LOW-9 QUOTATION MARK + ucharlists['Ps'].remove('„') # 201E DOUBLE LOW-9 QUOTATION MARK ucharlists['Pi'] += ['‚', '„'] - ucharlists['Pi'].remove('‛') # 201B SINGLE HIGH-REVERSED-9 QUOTATION MARK - ucharlists['Pi'].remove('‟') # 201F DOUBLE HIGH-REVERSED-9 QUOTATION MARK + ucharlists['Pi'].remove('‛') # 201B … HIGH-REVERSED-9 QUOTATION MARK + ucharlists['Pi'].remove('‟') # 201F … HIGH-REVERSED-9 QUOTATION MARK ucharlists['Pf'] += ['‛', '‟'] # 301F LOW DOUBLE PRIME QUOTATION MARK misses the opening pendant: diff --git a/docutils/tools/docutils-cli.py b/docutils/tools/docutils-cli.py index da77334c5..15307f247 100755 --- a/docutils/tools/docutils-cli.py +++ b/docutils/tools/docutils-cli.py @@ -30,14 +30,14 @@ class CliSettingsSpec(docutils.SettingsSpec): settings_spec = ( 'Docutils CLI Options', None, - (# 'help text', [<option strings>], {<keyword arguments>} - ('Reader name (default/current: "%default").', + # options: ('help text', [<option strings>], {<keyword arguments>}) + (('Reader name (default/current: "%default").', ['--reader'], {'metavar': '<reader>'}), ('Parser name (default/current: "%default").', ['--parser'], {'metavar': '<parser>'}), ('Writer name (default/current: "%default").', ['--writer'], {'metavar': '<writer>'}), - ) + ) ) config_section = 'docutils-cli application' config_section_dependencies = ('applications',) diff --git a/docutils/tools/quicktest.py b/docutils/tools/quicktest.py index 2c423f48e..a3335f318 100755 --- a/docutils/tools/quicktest.py +++ b/docutils/tools/quicktest.py @@ -102,9 +102,9 @@ def escape(text): """ Return `text` in triple-double-quoted Python string form. """ - text = text.replace('\\', '\\\\') # escape backslashes - text = text.replace('"""', '""\\"') # break up triple-double-quotes - text = text.replace(' \n', ' \\n\\\n') # protect trailing whitespace + text = text.replace('\\', '\\\\') # escape backslashes + text = text.replace('"""', '""\\"') # break up triple-double-quotes + text = text.replace(' \n', ' \\n\\\n') # protect trailing whitespace return text _outputFormatters = { diff --git a/docutils/tools/rst2html5.py b/docutils/tools/rst2html5.py index 744b5c751..f745205d5 100755 --- a/docutils/tools/rst2html5.py +++ b/docutils/tools/rst2html5.py @@ -19,7 +19,7 @@ The output is also valid XML. """ try: - import locale # module missing in Jython + import locale # module missing in Jython locale.setlocale(locale.LC_ALL, '') except locale.Error: pass |
