| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9296 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9295 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
| |
Up to Python 3.8, __file__ returns a relative path for the main script
specified on the command line. Use `Path.resolve()` to make it absolute before
calling `Path.parents`.
https://docs.python.org/3/whatsnew/3.9.html#other-language-changes
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9277 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
Running standard unittest on the test suite resulted in 89 ImportErrors
because ``import DocutilsTestSupport was used to set up sys.path()
but the module could not be found on the original sys.path().
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9274 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, the test suite only worked when the current working
directory was ``docutils/test/`. With this change all relative paths
are calculated explicitly such that the working directory no longer
affects the tests, meaning a less fragile test environment and
greater flexibility to use test runners other than ``alltests.py``.
This is part of the test suite refactoring project.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9236 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Compare dicts directly rather than through string indirection.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9171 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
Fix typo.
Remove spurious whitespace.
Bare "except" replaced with ``except Exception``.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9115 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
New interface function: frontend.get_default_settings()
easy access to default settings for programmatic use.
Add deprecation warnings.
Catch them when accessing the deprecated functions from Docutils.
Make docstrings conform to the Documentation Policies
(first line: summary, next line empty).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9047 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
flake8 rule F401
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9037 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@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@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@9026 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
flake8 rules
E301: expected 1 blank line, found 0
E306: expected 1 blank line before a nested definition, found 0
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9024 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@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@9018 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@9015 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Patch by Adam Turner.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9013 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
Config file syntax errors should be reported with
position (file and section) also for errors
raised by validation with frontend.validate_*().
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9010 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
| |
Test standard configuration files paths.
Test handling of the DOCUTILSCONFIG environment variable.
https://docutils.sourceforge.io/docs/user/config.html#configuration-files
Avoid false positives when testing for Warnings
(ignore additional warnings).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9000 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8998 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@8994 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8983 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@8973 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8964 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Config file sections may also contain settings from other components.
They are used, if
* they are defined in an active "SettingsSpec.settings_spec",
* the containing section is the `confg_section` or in the
`config_section_overrides` of one of the active components.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8963 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add samples testing the handling of configuration file settings that
affect other settings:
* `input_encoding`, `output_encoding`, and `error_encoding` also set
the respective `*_encoding_error_handler` if the value has the form
`<encoding>:<handler>`.
* `stylesheet` and `stylesheet_path` are mutually exclusive
and (re)set the other setting to None.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8962 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Found by Tomasz Kłoczko running "pytest" (cf. feature-request #81)
and by running `python3 -W all alltests.py`.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8933 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@8926 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8925 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
| |
- Make `frontend.ConfigDeprecationWarning` a subclass of `FutureWarning`
as it is also intended for end users.
https://docs.python.org/3/library/warnings.html#warning-categories
- Update deprecation warning tests.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8879 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
|
|
| |
Remove all uses of print as a statement. This includes comments, many of
which are simply removed as noise (they're in version control and can be
re-added later, if necessary).
Signed-off-by: Stephen Finucane <stephen@that.guru>
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8346 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8068 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
The --stylesheet-path arguments are searched in the --stylesheet-dirs,
therefore must not be made absolute before.
Thanks to Martin Gignac for tracking down the bug.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7630 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
| |
Circumvent the problem that the value may be "unicode" or "str" by testing
for "not a list".
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7584 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
partially applied
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7583 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
frontend.validate_colon_separated_string_list
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7581 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
or value.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7539 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
(validate_comma_separated_string_list, validate_ternary)
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7526 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7463 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
release)
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7400 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7339 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7337 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
The "strip-classes" and "strip-elements-with-classes" settings expect
a list but did not convert values given in a config file - making it
impossible to use them in a config file.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7224 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6159 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5738 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
| |
Backwards compatible changes for easier transition to py3.0.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5618 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5608 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5607 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4802 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
| |
|
|
|
|
|
|
| |
collapsed Author and Contact fields;
use canonical email addresses for David and Felix;
(I have reviewed the diff)
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4564 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|