| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
flake rule F841: local variable 'foo' is assigned to but never used
In test_odt.py, a no-op class definition is removed completely.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9038 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
flake8 rule F401
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9037 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
Breaking before binary operators is the recommended style
in PEP 8 (changed in April 2016).
flake8 rule W504
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9035 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Exceptions for sets of empty class definitions
and other cases where it improves comprehension.
flake8 rules
E502: the backslash is redundant between brackets
E701: multiple statements on one line (colon)
E704: multiple statements on one line (def)
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9032 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
flake8 rule E501: line too long (N > 79 characters)
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9030 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
flake8 rules
E302: expected 2 blank lines, found 1
E305: expected 2 blank lines after class or function definition
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9026 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
flakei rule E303: too many blank lines (N)
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9025 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
flake8 rule E271
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9023 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
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/docutils@9021 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
flake8 rule E231.
Mostly trailing commas in list and dictionary literals.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9018 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
flake8 rules
E225: missing whitespace around operator
E226: missing whitespace around arithmetic operator
E228: missing whitespace around modulo operator
Keep ignoring the latter two rules:
PEP8 limits the recommendation to "operators with lowest priority"
"if operators with different priorities are used".
flake8 also flags top level operators.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9017 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
E221 multiple spaces before operator
E222 multiple spaces after operator
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9016 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flake rules
E201 whitespace after '('
E202 whitespace before '}'
E203 whitespace before ':'
E211 whitespace before '('
Exception: : as binary operator in extended slices
(cf. https://www.python.org/dev/peps/pep-0008/#pet-peeves).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9015 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
The "Messages" transform no longer tests for to-be-ignored messages
but inserts all `system-messages` without parent into a
"System Messages" section.
This allows the "FilterMessages" transform to find and convert
matching `problematic` nodes (but now it also has to remove the
"System Messages" section if empty).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8997 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check conformance to our coding policies with flake8.
Fix the following problems:
E111 indentation is not a multiple of four
E114 indentation is not a multiple of four (comment)
E115 expected an indented block (comment)
E116 unexpected indentation (comment)
E117 over-indented
E121 continuation line under-indented for hanging indent
E122 continuation line missing indentation or outdented
E124 closing bracked does not match visual indentaion
E127 continuation line over-indented for visual indent
E128 continuation line under-indented for visual indent
E131 continuation line unaligned for hanging indent
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8994 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
W293 blank line contains whitespace
W391 blank line at end of file
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8993 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8992 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Patch by Adam Turner.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8984 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8983 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Patch by Adam Turner
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8980 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8979 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Patch by Adam Turner.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8976 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove duplicate definitions in language modules.
Import locale_encoding from `docutils.io`
Use decorator for staticmethod
Use True/False over 1/0.
`collections.OrderedDict` no longer required,
all dictionaries are ordered from Python 3.7
Remove obsolete `__cmp__` method
cf. https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons
Use str instead of type('').
Zero-argument ``super()``
Simplify test support module as
"u" prefix isn't used by repr in Python 3.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8973 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Merger of 2 patches by Adam Turner.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8969 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Patch by Adam Turner.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8956 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Patch by Adam Turner.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8954 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The version number of the next release(s) may be
"1.0, 1.1, ...", "0.19, 1.0, ...", or "0.19, 0.20, ...".
Lower announced removal version to "0.21 or later" for
DeprecationWarnings that did not include a removal version in
the last release and for DeprecationWarnings that
were added after the last release.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8949 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8942 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Simplifications for nodes.py and error_reporting.py will follow.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8928 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Only required with Python 2.x. Encoding in Py3k is utf8 by default.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8926 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
This transform is not used since the retirement of the
"newlatex" writer in Dec 2010.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8913 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Also change the priority of the SmartQuotes transform
to a level not already in use.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8912 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Although the documented API only promised an "iterable" as return
value, the implementation returned a list.
Because Sphinx < 4.0.0 relies on this and Sphinx < 3.5.4 places no upper
limit to the Docutils dependency, this led to many errors "in the wild".
Fixes bug #431.
New method Node.findall(): like Node.traverse() but returns an iterator.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8885 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8860 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Testing with "alltests.py" is currently impossible due to
caching (see itest_hyperlinks_de.py)
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8831 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Improve spacing,
allow customization.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8826 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8801 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
The "rawsource" argument of ``nodes.Text.__init__`` is ignored and deprecated.
Fix the documentation of nodes.Text.__new__().
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8782 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8767 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Fixes also bug #241.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8766 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8730 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
restructuredtext.txt:
Clarify which elements may come before the docinfo.
Add missing classes in "transforms.universal" docstring.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8727 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8718 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some 3rd party applications fail with AttributeError due to
missing values in the document.settings object.
a) because they don't follow the requirement documented in
utils.new_document:
If you will use the document object with any Docutils components,
you must provide their default settings as well.
b) because they may provide a hard-coded set missing new settings.
This should fix bug #415 and
https://github.com/readthedocs/recommonmark/issues/220.
See also the sphinx issue with Docutils 0.13.1
https://github.com/sphinx-doc/sphinx/issues/3951.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8671 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
| |
Basic "odt" support exists, "latex" support is planned.
In future, the `meta directive`__ may insert <meta> instead of
pending nodes, `making transforms/components.Filter` obsolete
(solves bug #241).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8603 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mitigate the danger of DoS attacs using
specially crafted rST input (cf. bug #381).
The default value of 10 000 characters should suffice for
legitimate use cases (e.g. long paragraphs in auto-wrapping editors
or extensive creative use of substitutions).
Applications processing untrusted rST might wish to lower this
limitation (together with other safety measures described in
docs/howto/security.txt).
Unsupervised processing of untrusted rST input should always
be safeguarded with limits on processing time and memory use.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8565 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8559 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8543 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
| |
Use the empty string as document["source"] value, when there
is no known source.
Also ensure there is no error when a PEP is written
not from a file.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8527 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generate unique ids adding a running number to
prefixes based on
a) the node "name" (if existing but not unique),
b) the new optional argument "suggested_prefix" (used for toc entries),
c) the tagname of the object (e.g. footnote, citation, footnote-reference,
system-message, ...)
Advantages:
* Meaningfully named links to ToC entries, footnotes, citations,
error messages, and sections with duplicate title.
* More stable links (a new footnote does not change backlinks to the ToC, say).
For backwards compatibility, this only applies if `settings.auto_id_prefix`
ends with a percent sign ("%"). This may become the default in the future.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8403 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|