| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
To create custom reST dispatcher easily, this adds CustomReSTDispatcher
class as a base class of custom dispatchers.
|
|
|
|
|
|
|
|
| |
Node.traverse() was marked as deprecated since docutils-0.18. Instead
of it, Node.findall() has been added as successor of traverse().
This applies a patch to docutils-0.17 or older to be available
Node.findall() and use it.
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removes the need for various translators from raising a
`NotImplementedError` exception when missing support for a specific node
type. docutils will already raise [1][2] a `NotImplementedError`
exception for these cases. This help reduce the implementation inside
Sphinx as well as prevents the possible undesired replication of
unknown-node handling with third-party extensions [3].
In most cases, generating a warning message for an unsupported node type
can be preferred. Providing an indication that a node is not supported
can be easier for a user of Sphinx to understand a limitation of a
builder over a generic "not implemented" exception. This commit takes
the logging call which is already used by `texinfo` and applies it to
the `SphinxTranslator` base class -- which any Sphinx translator
implementation can use.
[1]: https://repo.or.cz/docutils.git/blob/d169015ee0f412cffd69b33654d8a119d99bc0f3:/docutils/nodes.py#l2048
[2]: https://repo.or.cz/docutils.git/blob/53716a13b48128af6045139d3cd2909f61e7ed8e:/docutils/nodes.py#l1897
[3]: https://github.com/sphinx-doc/sphinx/issues/9921
Signed-off-by: James Knight <james.d.knight@live.com>
|
|
|
|
|
|
|
| |
Distutils module are now deprecated and will be removed in Python 3.12.
This replaces it by packaging module and reduces the dependency to it.
refs: #9820
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`SphinxDirective.get_source_info()` returns the pair of fullpath of
source and current line number. But our logging module expects one of
these:
* A string consists of fullpath and current line number
* A pair of docname and current line number
To show correct location for warnings, this adds `get_location()` method
that returns the former one.
Note: This also modifies C/C++ domains.
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
.. note::
$ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \;
$ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Keep imports alphabetically sorted and their order homogeneous across
Python source files.
The isort project has more feature and is more active than the
flake8-import-order plugin.
Most issues caught were simply import ordering from the same module.
Where imports were purposefully placed out of order, tag with
isort:skip.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, Sphinx mention nothing if users use unknown domain in their
documents (ex. `.. unknown:directive::`, `:unknown:role` and so on).
This starts to warn them to be clear non acceptable mark-ups.
refs: #8342
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | | |
For now, the debug log from SphinxTranslator does not help developers.
So this disable the log outputs. Let's reconsider if we'll need it.
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | | |
Also add get_source_info() to SphinxDirective and SphinxRole
|
| | | |
|
|/ / |
|
|\ \
| |/ |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
According to the python/mypy#7214, mypy-0.740 prefers a return
value of __exit__() method which does not swallow exceptions is
None instead of bool.
mypy#7214: https://github.com/python/mypy/issues/7214
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |\ |
|