mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '4.x' into class-option-for-code-directive
This commit is contained in:
25
.github/workflows/docutils-latest.yml
vendored
Normal file
25
.github/workflows/docutils-latest.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Test with the HEAD of docutils
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * SUN"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Check Python version
|
||||
run: python --version
|
||||
- name: Unpin docutils
|
||||
run: sed -i -e "s/'docutils>=.*'/'docutils'/" setup.py
|
||||
- name: Install graphviz
|
||||
run: sudo apt-get install graphviz
|
||||
- name: Install dependencies
|
||||
run: pip install -U tox codecov
|
||||
- name: Run Tox
|
||||
run: tox -e du-latest -- -vv
|
||||
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
name: [py36, py37, py38, py39]
|
||||
name: [py36, py37, py38, py39, py310]
|
||||
include:
|
||||
- name: py36
|
||||
python: 3.6
|
||||
@@ -23,9 +23,12 @@ jobs:
|
||||
python: 3.9
|
||||
docutils: du17
|
||||
coverage: "--cov ./ --cov-append --cov-config setup.cfg"
|
||||
- name: py310-dev
|
||||
python: 3.10-dev
|
||||
- name: py310
|
||||
python: "3.10"
|
||||
docutils: du17
|
||||
- name: py311-dev
|
||||
python: 3.11-dev
|
||||
docutils: py311
|
||||
env:
|
||||
PYTEST_ADDOPTS: ${{ matrix.coverage }}
|
||||
|
||||
@@ -47,6 +50,9 @@ jobs:
|
||||
run: sudo apt-get install graphviz
|
||||
- name: Install dependencies
|
||||
run: pip install -U tox codecov
|
||||
- name: Install the latest py package (for py3.11-dev)
|
||||
run: pip install -U git+https://github.com/pytest-dev/py
|
||||
if: ${{ matrix.python == '3.11-dev' }}
|
||||
- name: Run Tox
|
||||
run: tox -e ${{ matrix.docutils }} -- -vv
|
||||
- name: codecov
|
||||
|
||||
27
CHANGES
27
CHANGES
@@ -4,11 +4,26 @@ Release 4.3.0 (in development)
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
* Support Python 3.10
|
||||
|
||||
Incompatible changes
|
||||
--------------------
|
||||
|
||||
* #9649: ``searchindex.js``: the embedded data has changed format to allow
|
||||
objects with the same name in different domains.
|
||||
* #9672: The rendering of Python domain declarations is implemented
|
||||
with more docutils nodes to allow better CSS styling.
|
||||
It may break existing styling.
|
||||
* #9672: the signature of
|
||||
:py:meth:`domains.py.PyObject.get_signature_prefix` has changed to
|
||||
return a list of nodes instead of a plain string.
|
||||
* #9695: ``domains.js.JSObject.display_prefix`` has been changed into a method
|
||||
``get_display_prefix`` which now returns a list of nodes
|
||||
instead of a plain string.
|
||||
* #9695: The rendering of Javascript domain declarations is implemented
|
||||
with more docutils nodes to allow better CSS styling.
|
||||
It may break existing styling.
|
||||
|
||||
|
||||
Deprecated
|
||||
----------
|
||||
@@ -19,8 +34,13 @@ Features added
|
||||
* #9639: autodoc: Support asynchronous generator functions
|
||||
* #9664: autodoc: ``autodoc-process-bases`` supports to inject reST snippet as a
|
||||
base class
|
||||
* 9691: C, added new info-field ``retval``
|
||||
* #9691: C, added new info-field ``retval``
|
||||
for :rst:dir:`c:function` and :rst:dir:`c:macro`.
|
||||
* C++, added new info-field ``retval`` for :rst:dir:`cpp:function`.
|
||||
* #9672: More CSS classes on Python domain descriptions
|
||||
* #9695: More CSS classes on Javascript domain descriptions
|
||||
* #9683: Revert the removal of ``add_stylesheet()`` API. It will be kept until
|
||||
the Sphinx-6.0 release
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
@@ -41,7 +61,10 @@ Bugs fixed
|
||||
* #9649: HTML search: when objects have the same name but in different domains,
|
||||
return all of them as result instead of just one.
|
||||
* #9678: linkcheck: file extension was shown twice in warnings
|
||||
* Fix bug ``.. code::`` recognising ``:classes:`` option instead of ``:class:`` option. The new behaviour is to only accept the ``:class:`` option.
|
||||
* #9697: py domain: An index entry with parens was registered for ``py:method``
|
||||
directive with ``:property:`` option
|
||||
* Fix bug ``.. code::`` recognising ``:classes:`` option instead of ``:class:``
|
||||
option. The new behaviour is to only accept the ``:class:`` option.
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
BIN
doc/_static/tutorial/lumache-autosummary.png
vendored
Normal file
BIN
doc/_static/tutorial/lumache-autosummary.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
doc/_static/tutorial/lumache-py-function-full.png
vendored
Normal file
BIN
doc/_static/tutorial/lumache-py-function-full.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
BIN
doc/_static/tutorial/lumache-py-function.png
vendored
Normal file
BIN
doc/_static/tutorial/lumache-py-function.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
2
doc/_templates/index.html
vendored
2
doc/_templates/index.html
vendored
@@ -118,7 +118,7 @@
|
||||
this part of the documentation is for you.{%endtrans%}</p>
|
||||
|
||||
<ul>
|
||||
<li>{%trans path=pathto("internals/contributing")%}<a href="{{ path }}">Sphinx Contributors’s Guide</a></li>{%endtrans%}
|
||||
<li>{%trans path=pathto("internals/contributing")%}<a href="{{ path }}">Sphinx Contributors’ Guide</a></li>{%endtrans%}
|
||||
<li>{%trans path=pathto("internals/authors")%}<a href="{{ path }}">Sphinx Authors</a></li>{%endtrans%}
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -748,6 +748,11 @@ The following is a list of deprecated interfaces.
|
||||
- 4.0
|
||||
- ``sphinx.domains.std.StandardDomain.process_doc()``
|
||||
|
||||
* - ``sphinx.domains.js.JSObject.display_prefix``
|
||||
-
|
||||
- 4.3
|
||||
- ``sphinx.domains.js.JSObject.get_display_prefix()``
|
||||
|
||||
* - ``sphinx.environment.NoUri``
|
||||
- 2.1
|
||||
- 3.0
|
||||
@@ -1207,7 +1212,7 @@ The following is a list of deprecated interfaces.
|
||||
|
||||
* - :meth:`~sphinx.application.Sphinx.add_stylesheet()`
|
||||
- 1.8
|
||||
- 4.0
|
||||
- 6.0
|
||||
- :meth:`~sphinx.application.Sphinx.add_css_file()`
|
||||
|
||||
* - :meth:`~sphinx.application.Sphinx.add_javascript()`
|
||||
|
||||
166
doc/tutorial/automatic-doc-generation.rst
Normal file
166
doc/tutorial/automatic-doc-generation.rst
Normal file
@@ -0,0 +1,166 @@
|
||||
Automatic documentation generation from code
|
||||
============================================
|
||||
|
||||
In the :ref:`previous section <tutorial-describing-objects>` of the tutorial
|
||||
you manually documented a Python function in Sphinx. However, the description
|
||||
was out of sync with the code itself, since the function signature was not
|
||||
the same. Besides, it would be nice to reuse `Python
|
||||
docstrings <https://www.python.org/dev/peps/pep-0257/#what-is-a-docstring>`_
|
||||
in the documentation, rather than having to write the information in two
|
||||
places.
|
||||
|
||||
Fortunately, :doc:`the autodoc extension </usage/extensions/autodoc>` provides this
|
||||
functionality.
|
||||
|
||||
Reusing signatures and docstrings with autodoc
|
||||
----------------------------------------------
|
||||
|
||||
To use autodoc, first add it to the list of enabled extensions:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: docs/source/conf.py
|
||||
:emphasize-lines: 4
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.duration',
|
||||
'sphinx.ext.doctest',
|
||||
'sphinx.ext.autodoc',
|
||||
]
|
||||
|
||||
Next, move the content of the ``.. py:function`` directive to the function
|
||||
docstring in the original Python file, as follows:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: lumache.py
|
||||
:emphasize-lines: 2-11
|
||||
|
||||
def get_random_ingredients(kind=None):
|
||||
"""
|
||||
Return a list of random ingredients as strings.
|
||||
|
||||
:param kind: Optional "kind" of ingredients.
|
||||
:type kind: list[str] or None
|
||||
:raise lumache.InvalidKindError: If the kind is invalid.
|
||||
:return: The ingredients list.
|
||||
:rtype: list[str]
|
||||
|
||||
"""
|
||||
return ["shells", "gorgonzola", "parsley"]
|
||||
|
||||
Finally, replace the ``.. py:function`` directive from the Sphinx documentation
|
||||
with :rst:dir:`autofunction`:
|
||||
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/usage.rst
|
||||
:emphasize-lines: 3
|
||||
|
||||
you can use the ``lumache.get_random_ingredients()`` function:
|
||||
|
||||
.. autofunction:: lumache.get_random_ingredients
|
||||
|
||||
If you now build the HTML documentation, the output will be the same!
|
||||
With the advantage that it is generated from the code itself.
|
||||
Sphinx took the reStructuredText from the docstring and included it,
|
||||
also generating proper cross-references.
|
||||
|
||||
You can also autogenerate documentation from other objects. For example, add
|
||||
the code for the ``InvalidKindError`` exception:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: lumache.py
|
||||
|
||||
class InvalidKindError(Exception):
|
||||
"""Raised if the kind is invalid."""
|
||||
pass
|
||||
|
||||
And replace the ``.. py:exception`` directive with :rst:dir:`autoexception`
|
||||
as follows:
|
||||
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/usage.rst
|
||||
:emphasize-lines: 4
|
||||
|
||||
or ``"veggies"``. Otherwise, :py:func:`lumache.get_random_ingredients`
|
||||
will raise an exception.
|
||||
|
||||
.. autoexception:: lumache.InvalidKindError
|
||||
|
||||
And again, after running ``make html``, the output will be the same as before.
|
||||
|
||||
Generating comprehensive API references
|
||||
---------------------------------------
|
||||
|
||||
While using ``sphinx.ext.autodoc`` makes keeping the code and the documentation
|
||||
in sync much easier, it still requires you to write an ``auto*`` directive
|
||||
for every object you want to document. Sphinx provides yet another level of
|
||||
automation: the :doc:`autosummary </usage/extensions/autosummary>` extension.
|
||||
|
||||
The :rst:dir:`autosummary` directive generates documents that contain all the
|
||||
necessary ``autodoc`` directives. To use it, first enable the autosummary
|
||||
extension:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: docs/source/conf.py
|
||||
:emphasize-lines: 5
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.duration',
|
||||
'sphinx.ext.doctest',
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.autosummary',
|
||||
]
|
||||
|
||||
Next, create a new ``api.rst`` file with these contents:
|
||||
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/api.rst
|
||||
|
||||
API
|
||||
===
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
|
||||
lumache
|
||||
|
||||
Remember to include the new document in the root toctree:
|
||||
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/index.rst
|
||||
:emphasize-lines: 7
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
.. toctree::
|
||||
|
||||
usage
|
||||
api
|
||||
|
||||
Finally, after you build the HTML documentation running ``make html``, it will
|
||||
contain two new pages:
|
||||
|
||||
- ``api.html``, corresponding to ``docs/source/api.rst`` and containing a table
|
||||
with the objects you included in the ``autosummary`` directive (in this case,
|
||||
only one).
|
||||
- ``generated/lumache.html``, corresponding to a newly created reST file
|
||||
``generated/lumache.rst`` and containing a summary of members of the module,
|
||||
in this case one function and one exception.
|
||||
|
||||
.. figure:: /_static/tutorial/lumache-autosummary.png
|
||||
:width: 80%
|
||||
:align: center
|
||||
:alt: Summary page created by autosummary
|
||||
|
||||
Summary page created by autosummary
|
||||
|
||||
Each of the links in the summary page will take you to the places where you
|
||||
originally used the corresponding ``autodoc`` directive, in this case in the
|
||||
``usage.rst`` document.
|
||||
|
||||
.. note::
|
||||
|
||||
The generated files are based on `Jinja2
|
||||
templates <https://jinja2docs.readthedocs.io/>`_ that
|
||||
:ref:`can be customized <autosummary-customizing-templates>`,
|
||||
but that is out of scope for this tutorial.
|
||||
231
doc/tutorial/describing-code.rst
Normal file
231
doc/tutorial/describing-code.rst
Normal file
@@ -0,0 +1,231 @@
|
||||
Describing code in Sphinx
|
||||
=========================
|
||||
|
||||
In the :doc:`previous sections of the tutorial </tutorial/index>` you can read
|
||||
how to write narrative or prose documentation in Sphinx. In this section you
|
||||
will describe code objects instead.
|
||||
|
||||
Sphinx supports documenting code objects in several languages, namely Python,
|
||||
C, C++, JavaScript, and reStructuredText. Each of them can be documented using
|
||||
a series of directives and roles grouped by
|
||||
:doc:`domain </usage/restructuredtext/domains>`. For the remainder of the
|
||||
tutorial you will use the Python domain, but all the concepts seen in this
|
||||
section apply for the other domains as well.
|
||||
|
||||
.. _tutorial-describing-objects:
|
||||
|
||||
Documenting Python objects
|
||||
--------------------------
|
||||
|
||||
Sphinx offers several roles and directives to document Python objects,
|
||||
all grouped together in :ref:`the Python domain <python-domain>`. For example,
|
||||
you can use the :rst:dir:`py:function` directive to document a Python function,
|
||||
as follows:
|
||||
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/usage.rst
|
||||
|
||||
Creating recipes
|
||||
----------------
|
||||
|
||||
To retrieve a list of random ingredients,
|
||||
you can use the ``lumache.get_random_ingredients()`` function:
|
||||
|
||||
.. py:function:: lumache.get_random_ingredients(kind=None)
|
||||
|
||||
Return a list of random ingredients as strings.
|
||||
|
||||
:param kind: Optional "kind" of ingredients.
|
||||
:type kind: list[str] or None
|
||||
:return: The ingredients list.
|
||||
:rtype: list[str]
|
||||
|
||||
Which will render like this:
|
||||
|
||||
.. figure:: /_static/tutorial/lumache-py-function.png
|
||||
:width: 80%
|
||||
:align: center
|
||||
:alt: HTML result of documenting a Python function in Sphinx
|
||||
|
||||
The rendered result of documenting a Python function in Sphinx
|
||||
|
||||
Notice several things:
|
||||
|
||||
- Sphinx parsed the argument of the ``.. py:function`` directive and
|
||||
highlighted the module, the function name, and the parameters appropriately.
|
||||
- The directive content includes a one-line description of the function,
|
||||
as well as a :ref:`info field list <info-field-lists>` containing the function
|
||||
parameter, its expected type, the return value, and the return type.
|
||||
|
||||
.. note::
|
||||
|
||||
The ``py:`` prefix specifies the :term:`domain`. You may configure the
|
||||
default domain so you can omit the prefix, either globally using the
|
||||
:confval:`primary_domain` configuration, or use the
|
||||
:rst:dir:`default-domain` directive to change it from the point it is called
|
||||
until the end of the file.
|
||||
For example, if you set it to ``py`` (the default), you can write
|
||||
``.. function::`` directly.
|
||||
|
||||
Cross-referencing Python objects
|
||||
--------------------------------
|
||||
|
||||
By default, most of these directives generate entities that can be
|
||||
cross-referenced from any part of the documentation by using
|
||||
:ref:`a corresponding role <python-roles>`. For the case of functions,
|
||||
you can use :rst:role:`py:func` for that, as follows:
|
||||
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/usage.rst
|
||||
|
||||
The ``kind`` parameter should be either ``"meat"``, ``"fish"``,
|
||||
or ``"veggies"``. Otherwise, :py:func:`lumache.get_random_ingredients`
|
||||
will raise an exception.
|
||||
|
||||
When generating code documentation, Sphinx will generate a cross-reference automatically just
|
||||
by using the name of the object, without you having to explicitly use a role
|
||||
for that. For example, you can describe the custom exception raised by the
|
||||
function using the :rst:dir:`py:exception` directive:
|
||||
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/usage.rst
|
||||
|
||||
.. py:exception:: lumache.InvalidKindError
|
||||
|
||||
Raised if the kind is invalid.
|
||||
|
||||
Then, add this exception to the original description of the function:
|
||||
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/usage.rst
|
||||
:emphasize-lines: 7
|
||||
|
||||
.. py:function:: lumache.get_random_ingredients(kind=None)
|
||||
|
||||
Return a list of random ingredients as strings.
|
||||
|
||||
:param kind: Optional "kind" of ingredients.
|
||||
:type kind: list[str] or None
|
||||
:raise lumache.InvalidKindError: If the kind is invalid.
|
||||
:return: The ingredients list.
|
||||
:rtype: list[str]
|
||||
|
||||
And finally, this is how the result would look:
|
||||
|
||||
.. figure:: /_static/tutorial/lumache-py-function-full.png
|
||||
:width: 80%
|
||||
:align: center
|
||||
:alt: HTML result of documenting a Python function in Sphinx
|
||||
with cross-references
|
||||
|
||||
HTML result of documenting a Python function in Sphinx with cross-references
|
||||
|
||||
Beautiful, isn't it?
|
||||
|
||||
Including doctests in your documentation
|
||||
----------------------------------------
|
||||
|
||||
Since you are now describing code from a Python library, it will become useful
|
||||
to keep both the documentation and the code as synchronized as possible.
|
||||
One of the ways to do that in Sphinx is to include code snippets in the
|
||||
documentation, called *doctests*, that are executed when the documentation is
|
||||
built.
|
||||
|
||||
To demonstrate doctests and other Sphinx features covered in this tutorial,
|
||||
Sphinx will need to be able to import the code. To achieve that, write this
|
||||
at the beginning of ``conf.py``:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: docs/source/conf.py
|
||||
:emphasize-lines: 3-5
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here.
|
||||
import pathlib
|
||||
import sys
|
||||
sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix())
|
||||
|
||||
.. note::
|
||||
|
||||
An alternative to changing the :py:data:`sys.path` variable is to create a
|
||||
``pyproject.toml`` file and make the code installable,
|
||||
so it behaves like any other Python library. However, the ``sys.path``
|
||||
approach is simpler.
|
||||
|
||||
Then, before adding doctests to your documentation, enable the
|
||||
:doc:`doctest </usage/extensions/doctest>` extension in ``conf.py``:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: docs/source/conf.py
|
||||
:emphasize-lines: 3
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.duration',
|
||||
'sphinx.ext.doctest',
|
||||
]
|
||||
|
||||
Next, write a doctest block as follows:
|
||||
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/usage.rst
|
||||
|
||||
>>> import lumache
|
||||
>>> lumache.get_random_ingredients()
|
||||
['shells', 'gorgonzola', 'parsley']
|
||||
|
||||
Doctests include the Python instructions to be run preceded by ``>>>``,
|
||||
the standard Python interpreter prompt, as well as the expected output
|
||||
of each instruction. This way, Sphinx can check whether the actual output
|
||||
matches the expected one.
|
||||
|
||||
To observe how a doctest failure looks like (rather than a code error as
|
||||
above), let's write the return value incorrectly first. Therefore, add a
|
||||
function ``get_random_ingredients`` like this:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: lumache.py
|
||||
|
||||
def get_random_ingredients(kind=None):
|
||||
return ["eggs", "bacon", "spam"]
|
||||
|
||||
You can now run ``make doctest`` to execute the doctests of your documentation.
|
||||
Initially this will display an error, since the actual code does not behave
|
||||
as specified:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
(.venv) $ make doctest
|
||||
Running Sphinx v4.2.0
|
||||
loading pickled environment... done
|
||||
...
|
||||
running tests...
|
||||
|
||||
Document: usage
|
||||
---------------
|
||||
**********************************************************************
|
||||
File "usage.rst", line 44, in default
|
||||
Failed example:
|
||||
lumache.get_random_ingredients()
|
||||
Expected:
|
||||
['shells', 'gorgonzola', 'parsley']
|
||||
Got:
|
||||
['eggs', 'bacon', 'spam']
|
||||
**********************************************************************
|
||||
...
|
||||
make: *** [Makefile:20: doctest] Error 1
|
||||
|
||||
As you can see, doctest reports the expected and the actual results,
|
||||
for easy examination. It is now time to fix the function:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: lumache.py
|
||||
:emphasize-lines: 2
|
||||
|
||||
def get_random_ingredients(kind=None):
|
||||
return ["shells", "gorgonzola", "parsley"]
|
||||
|
||||
And finally, ``make test`` reports success!
|
||||
|
||||
For big projects though, this manual approach can become a bit tedious.
|
||||
In the next section, you will see :doc:`how to automate the
|
||||
process </tutorial/automatic-doc-generation>`.
|
||||
@@ -79,7 +79,8 @@ behavior by adding the following code at the end of your ``conf.py``:
|
||||
|
||||
With this configuration value, and after running ``make epub`` again, you will
|
||||
notice that URLs appear now as footnotes, which avoids cluttering the text.
|
||||
Sweet!
|
||||
Sweet! Read on to explore :doc:`other ways to customize
|
||||
Sphinx </tutorial/more-sphinx-customization>`.
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -117,3 +117,4 @@ something like this:
|
||||
Freshly created documentation of Lumache
|
||||
|
||||
There we go! You created your first HTML documentation using Sphinx.
|
||||
Now you can start :doc:`customizing it </tutorial/first-steps>`.
|
||||
|
||||
@@ -33,4 +33,6 @@ project.
|
||||
first-steps
|
||||
more-sphinx-customization
|
||||
narrative-documentation
|
||||
describing-code
|
||||
automatic-doc-generation
|
||||
end
|
||||
|
||||
@@ -73,3 +73,6 @@ appearance:
|
||||
:alt: HTML documentation of Lumache with the Furo theme
|
||||
|
||||
HTML documentation of Lumache with the Furo theme
|
||||
|
||||
It is now time to :doc:`expand the narrative documentation and split it into
|
||||
several documents </tutorial/narrative-documentation>`.
|
||||
|
||||
@@ -85,8 +85,9 @@ introduction paragraph in ``index.rst``:
|
||||
|
||||
Check out the :doc:`usage` section for further information.
|
||||
|
||||
The :rst:role:`doc` role you used automatically references a specific document
|
||||
in the project, in this case the ``usage.rst`` you created earlier.
|
||||
The :rst:role:`doc` :ref:`role <rst-roles-alt>` you used automatically
|
||||
references a specific document in the project, in this case the ``usage.rst``
|
||||
you created earlier.
|
||||
|
||||
Alternatively, you can also add a cross-reference to an arbitrary part of the
|
||||
project. For that, you need to use the :rst:role:`ref` role, and add an
|
||||
@@ -126,3 +127,6 @@ cross-reference to. If you do not include an explicit title, hence using
|
||||
``:ref:`installation```, the section title will be used (in this case,
|
||||
``Installation``). Both the ``:doc:`` and the ``:ref:`` roles will be rendered
|
||||
as hyperlinks in the HTML documentation.
|
||||
|
||||
What about :doc:`documenting code objects in Sphinx </tutorial/describing-code>`?
|
||||
Read on!
|
||||
|
||||
@@ -210,6 +210,7 @@ also use these config values:
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
.. _autosummary-customizing-templates:
|
||||
|
||||
Customizing templates
|
||||
---------------------
|
||||
|
||||
@@ -125,6 +125,7 @@ In short:
|
||||
component of the target. For example, ``:py:meth:`~Queue.Queue.get``` will
|
||||
refer to ``Queue.Queue.get`` but only display ``get`` as the link text.
|
||||
|
||||
.. _python-domain:
|
||||
|
||||
The Python Domain
|
||||
-----------------
|
||||
@@ -677,7 +678,7 @@ The C domain (name **c**) is suited for documentation of C API.
|
||||
Note that you don't have to backslash-escape asterisks in the signature, as
|
||||
it is not parsed by the reST inliner.
|
||||
|
||||
In the description of a function you can use the following info-fields
|
||||
In the description of a function you can use the following info fields
|
||||
(see also :ref:`info-field-lists`).
|
||||
|
||||
* ``param``, ``parameter``, ``arg``, ``argument``,
|
||||
@@ -723,7 +724,7 @@ The C domain (name **c**) is suited for documentation of C API.
|
||||
Describes a C macro, i.e., a C-language ``#define``, without the replacement
|
||||
text.
|
||||
|
||||
In the description of a macro you can use the same info-fields as for the
|
||||
In the description of a macro you can use the same info fields as for the
|
||||
:rst:dir:`c:function` directive.
|
||||
|
||||
.. versionadded:: 3.0
|
||||
@@ -1496,14 +1497,23 @@ The ``cpp:namespace-pop`` directive undoes the most recent
|
||||
Info field lists
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
The C++ directives support the following info fields (see also
|
||||
:ref:`info-field-lists`):
|
||||
All the C++ directives for declaring entities support the following
|
||||
info fields (see also :ref:`info-field-lists`):
|
||||
|
||||
* `param`, `parameter`, `arg`, `argument`: Description of a parameter.
|
||||
* `tparam`: Description of a template parameter.
|
||||
* `returns`, `return`: Description of a return value.
|
||||
* ``tparam``: Description of a template parameter.
|
||||
|
||||
The :rst:dir:`cpp:function` directive additionally supports the
|
||||
following fields:
|
||||
|
||||
* ``param``, ``parameter``, ``arg``, ``argument``: Description of a parameter.
|
||||
* ``returns``, ``return``: Description of a return value.
|
||||
* ``retval``, ``retvals``: An alternative to ``returns`` for describing
|
||||
the result of the function.
|
||||
* `throws`, `throw`, `exception`: Description of a possibly thrown exception.
|
||||
|
||||
.. versionadded:: 4.3
|
||||
The ``retval`` field type.
|
||||
|
||||
.. _cpp-roles:
|
||||
|
||||
Cross-referencing
|
||||
|
||||
1
setup.py
1
setup.py
@@ -207,6 +207,7 @@ setup(
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: Implementation :: CPython',
|
||||
'Programming Language :: Python :: Implementation :: PyPy',
|
||||
'Framework :: Setuptools Plugin',
|
||||
|
||||
@@ -13,6 +13,8 @@ from typing import TYPE_CHECKING, Any, Dict, List, Sequence
|
||||
from docutils import nodes
|
||||
from docutils.nodes import Element
|
||||
|
||||
from sphinx.util import docutils
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sphinx.application import Sphinx
|
||||
|
||||
@@ -563,7 +565,6 @@ def setup(app: "Sphinx") -> Dict[str, Any]:
|
||||
app.add_node(start_of_file)
|
||||
app.add_node(highlightlang)
|
||||
app.add_node(tabular_col_spec)
|
||||
app.add_node(meta)
|
||||
app.add_node(pending_xref)
|
||||
app.add_node(number_reference)
|
||||
app.add_node(download_reference)
|
||||
@@ -571,6 +572,9 @@ def setup(app: "Sphinx") -> Dict[str, Any]:
|
||||
app.add_node(literal_strong)
|
||||
app.add_node(manpage)
|
||||
|
||||
if docutils.__version_info__ < (0, 18):
|
||||
app.add_node(meta)
|
||||
|
||||
return {
|
||||
'version': 'builtin',
|
||||
'parallel_read_safe': True,
|
||||
|
||||
@@ -1046,6 +1046,26 @@ class Sphinx:
|
||||
if hasattr(self.builder, 'add_css_file'):
|
||||
self.builder.add_css_file(filename, priority=priority, **kwargs) # type: ignore
|
||||
|
||||
def add_stylesheet(self, filename: str, alternate: bool = False, title: str = None
|
||||
) -> None:
|
||||
"""An alias of :meth:`add_css_file`.
|
||||
|
||||
.. deprecated:: 1.8
|
||||
"""
|
||||
logger.warning('The app.add_stylesheet() is deprecated. '
|
||||
'Please use app.add_css_file() instead.')
|
||||
|
||||
attributes = {} # type: Dict[str, Any]
|
||||
if alternate:
|
||||
attributes['rel'] = 'alternate stylesheet'
|
||||
else:
|
||||
attributes['rel'] = 'stylesheet'
|
||||
|
||||
if title:
|
||||
attributes['title'] = title
|
||||
|
||||
self.add_css_file(filename, **attributes)
|
||||
|
||||
def add_latex_package(self, packagename: str, options: str = None,
|
||||
after_hyperref: bool = False) -> None:
|
||||
r"""Register a package to include in the LaTeX source code.
|
||||
|
||||
@@ -14,7 +14,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Tuple, cast
|
||||
from docutils import nodes
|
||||
from docutils.nodes import Node, make_id, system_message
|
||||
from docutils.parsers.rst import directives
|
||||
from docutils.parsers.rst.directives import html, images, tables
|
||||
from docutils.parsers.rst.directives import images, tables
|
||||
|
||||
from sphinx import addnodes
|
||||
from sphinx.deprecation import RemovedInSphinx60Warning
|
||||
@@ -27,6 +27,15 @@ from sphinx.util.nodes import set_source_info
|
||||
from sphinx.util.osutil import SEP, os_path, relpath
|
||||
from sphinx.util.typing import OptionSpec
|
||||
|
||||
try:
|
||||
from docutils.nodes import meta as meta_node # type: ignore
|
||||
from docutils.parsers.rst.directives.misc import Meta as MetaBase # type: ignore
|
||||
except ImportError:
|
||||
# docutils-0.17 or older
|
||||
from docutils.parsers.rst.directives.html import Meta as MetaBase
|
||||
from docutils.parsers.rst.directives.html import MetaBody
|
||||
meta_node = MetaBody.meta
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sphinx.application import Sphinx
|
||||
|
||||
@@ -60,19 +69,19 @@ class Figure(images.Figure):
|
||||
return [figure_node]
|
||||
|
||||
|
||||
class Meta(html.Meta, SphinxDirective):
|
||||
class Meta(MetaBase, SphinxDirective):
|
||||
def run(self) -> List[Node]:
|
||||
result = super().run()
|
||||
for node in result:
|
||||
if (isinstance(node, nodes.pending) and
|
||||
isinstance(node.details['nodes'][0], html.MetaBody.meta)):
|
||||
isinstance(node.details['nodes'][0], meta_node)):
|
||||
meta = node.details['nodes'][0]
|
||||
meta.source = self.env.doc2path(self.env.docname)
|
||||
meta.line = self.lineno
|
||||
meta.rawcontent = meta['content'] # type: ignore
|
||||
meta.rawcontent = meta['content']
|
||||
|
||||
# docutils' meta nodes aren't picklable because the class is nested
|
||||
meta.__class__ = addnodes.meta # type: ignore
|
||||
meta.__class__ = addnodes.meta
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@@ -6934,18 +6934,10 @@ def _make_phony_error_name() -> ASTNestedName:
|
||||
class CPPObject(ObjectDescription[ASTDeclaration]):
|
||||
"""Description of a C++ language object."""
|
||||
|
||||
doc_field_types = [
|
||||
GroupedField('parameter', label=_('Parameters'),
|
||||
names=('param', 'parameter', 'arg', 'argument'),
|
||||
can_collapse=True),
|
||||
doc_field_types: List[Field] = [
|
||||
GroupedField('template parameter', label=_('Template Parameters'),
|
||||
names=('tparam', 'template parameter'),
|
||||
can_collapse=True),
|
||||
GroupedField('exceptions', label=_('Throws'), rolename='expr',
|
||||
names=('throws', 'throw', 'exception'),
|
||||
can_collapse=True),
|
||||
Field('returnvalue', label=_('Returns'), has_arg=False,
|
||||
names=('returns', 'return')),
|
||||
]
|
||||
|
||||
option_spec: OptionSpec = {
|
||||
@@ -7181,6 +7173,20 @@ class CPPMemberObject(CPPObject):
|
||||
class CPPFunctionObject(CPPObject):
|
||||
object_type = 'function'
|
||||
|
||||
doc_field_types = CPPObject.doc_field_types + [
|
||||
GroupedField('parameter', label=_('Parameters'),
|
||||
names=('param', 'parameter', 'arg', 'argument'),
|
||||
can_collapse=True),
|
||||
GroupedField('exceptions', label=_('Throws'), rolename='expr',
|
||||
names=('throws', 'throw', 'exception'),
|
||||
can_collapse=True),
|
||||
GroupedField('retval', label=_('Return values'),
|
||||
names=('retvals', 'retval'),
|
||||
can_collapse=True),
|
||||
Field('returnvalue', label=_('Returns'), has_arg=False,
|
||||
names=('returns', 'return')),
|
||||
]
|
||||
|
||||
|
||||
class CPPClassObject(CPPObject):
|
||||
object_type = 'class'
|
||||
|
||||
@@ -41,9 +41,6 @@ class JSObject(ObjectDescription[Tuple[str, str]]):
|
||||
#: added
|
||||
has_arguments = False
|
||||
|
||||
#: what is displayed right before the documentation entry
|
||||
display_prefix: str = None
|
||||
|
||||
#: If ``allow_nesting`` is ``True``, the object prefixes will be accumulated
|
||||
#: based on directive nesting
|
||||
allow_nesting = False
|
||||
@@ -53,6 +50,10 @@ class JSObject(ObjectDescription[Tuple[str, str]]):
|
||||
'noindexentry': directives.flag,
|
||||
}
|
||||
|
||||
def get_display_prefix(self) -> List[Node]:
|
||||
#: what is displayed right before the documentation entry
|
||||
return []
|
||||
|
||||
def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]:
|
||||
"""Breaks down construct signatures
|
||||
|
||||
@@ -71,6 +72,7 @@ class JSObject(ObjectDescription[Tuple[str, str]]):
|
||||
# If construct is nested, prefix the current prefix
|
||||
prefix = self.env.ref_context.get('js:object', None)
|
||||
mod_name = self.env.ref_context.get('js:module')
|
||||
|
||||
name = member
|
||||
try:
|
||||
member_prefix, member_name = member.rsplit('.', 1)
|
||||
@@ -91,14 +93,22 @@ class JSObject(ObjectDescription[Tuple[str, str]]):
|
||||
signode['object'] = prefix
|
||||
signode['fullname'] = fullname
|
||||
|
||||
if self.display_prefix:
|
||||
signode += addnodes.desc_annotation(self.display_prefix,
|
||||
self.display_prefix)
|
||||
display_prefix = self.get_display_prefix()
|
||||
if display_prefix:
|
||||
signode += addnodes.desc_annotation('', '', *display_prefix)
|
||||
|
||||
actual_prefix = None
|
||||
if prefix:
|
||||
signode += addnodes.desc_addname(prefix + '.', prefix + '.')
|
||||
actual_prefix = prefix
|
||||
elif mod_name:
|
||||
signode += addnodes.desc_addname(mod_name + '.', mod_name + '.')
|
||||
signode += addnodes.desc_name(name, name)
|
||||
actual_prefix = mod_name
|
||||
if actual_prefix:
|
||||
addName = addnodes.desc_addname('', '')
|
||||
for p in actual_prefix.split('.'):
|
||||
addName += addnodes.desc_sig_name(p, p)
|
||||
addName += addnodes.desc_sig_punctuation('.', '.')
|
||||
signode += addName
|
||||
signode += addnodes.desc_name('', '', addnodes.desc_sig_name(name, name))
|
||||
if self.has_arguments:
|
||||
if not arglist:
|
||||
signode += addnodes.desc_parameterlist()
|
||||
@@ -227,9 +237,13 @@ class JSCallable(JSObject):
|
||||
|
||||
class JSConstructor(JSCallable):
|
||||
"""Like a callable but with a different prefix."""
|
||||
display_prefix = 'class '
|
||||
|
||||
allow_nesting = True
|
||||
|
||||
def get_display_prefix(self) -> List[Node]:
|
||||
return [addnodes.desc_sig_keyword('class', 'class'),
|
||||
addnodes.desc_sig_space()]
|
||||
|
||||
|
||||
class JSModule(SphinxDirective):
|
||||
"""
|
||||
|
||||
@@ -118,11 +118,21 @@ def _parse_annotation(annotation: str, env: BuildEnvironment = None) -> List[Nod
|
||||
result.extend(unparse(node.right))
|
||||
return result
|
||||
elif isinstance(node, ast.BitOr):
|
||||
return [nodes.Text(' '), addnodes.desc_sig_punctuation('', '|'), nodes.Text(' ')]
|
||||
return [addnodes.desc_sig_space(),
|
||||
addnodes.desc_sig_punctuation('', '|'),
|
||||
addnodes.desc_sig_space()]
|
||||
elif isinstance(node, ast.Constant): # type: ignore
|
||||
if node.value is Ellipsis:
|
||||
return [addnodes.desc_sig_punctuation('', "...")]
|
||||
elif isinstance(node.value, bool):
|
||||
return [addnodes.desc_sig_keyword('', repr(node.value))]
|
||||
elif isinstance(node.value, int):
|
||||
return [addnodes.desc_sig_literal_number('', repr(node.value))]
|
||||
elif isinstance(node.value, str):
|
||||
return [addnodes.desc_sig_literal_string('', repr(node.value))]
|
||||
else:
|
||||
# handles None, which is further handled by type_to_xref later
|
||||
# and fallback for other types that should be converted
|
||||
return [nodes.Text(repr(node.value))]
|
||||
elif isinstance(node, ast.Expr):
|
||||
return unparse(node.value)
|
||||
@@ -136,7 +146,9 @@ def _parse_annotation(annotation: str, env: BuildEnvironment = None) -> List[Nod
|
||||
# once
|
||||
for elem in node.elts:
|
||||
result.extend(unparse(elem))
|
||||
result.append(addnodes.desc_sig_punctuation('', ', '))
|
||||
result.append(addnodes.desc_sig_punctuation('', ','))
|
||||
result.append(addnodes.desc_sig_space())
|
||||
result.pop()
|
||||
result.pop()
|
||||
result.append(addnodes.desc_sig_punctuation('', ']'))
|
||||
return result
|
||||
@@ -161,7 +173,9 @@ def _parse_annotation(annotation: str, env: BuildEnvironment = None) -> List[Nod
|
||||
result = []
|
||||
for elem in node.elts:
|
||||
result.extend(unparse(elem))
|
||||
result.append(addnodes.desc_sig_punctuation('', ', '))
|
||||
result.append(addnodes.desc_sig_punctuation('', ','))
|
||||
result.append(addnodes.desc_sig_space())
|
||||
result.pop()
|
||||
result.pop()
|
||||
else:
|
||||
result = [addnodes.desc_sig_punctuation('', '('),
|
||||
@@ -222,13 +236,13 @@ def _parse_arglist(arglist: str, env: BuildEnvironment = None) -> addnodes.desc_
|
||||
if param.annotation is not param.empty:
|
||||
children = _parse_annotation(param.annotation, env)
|
||||
node += addnodes.desc_sig_punctuation('', ':')
|
||||
node += nodes.Text(' ')
|
||||
node += addnodes.desc_sig_space()
|
||||
node += addnodes.desc_sig_name('', '', *children) # type: ignore
|
||||
if param.default is not param.empty:
|
||||
if param.annotation is not param.empty:
|
||||
node += nodes.Text(' ')
|
||||
node += addnodes.desc_sig_space()
|
||||
node += addnodes.desc_sig_operator('', '=')
|
||||
node += nodes.Text(' ')
|
||||
node += addnodes.desc_sig_space()
|
||||
else:
|
||||
node += addnodes.desc_sig_operator('', '=')
|
||||
node += nodes.inline('', param.default, classes=['default_value'],
|
||||
@@ -271,7 +285,8 @@ def _pseudo_parse_arglist(signode: desc_signature, arglist: str) -> None:
|
||||
ends_open += 1
|
||||
argument = argument[:-1].strip()
|
||||
if argument:
|
||||
stack[-1] += addnodes.desc_parameter(argument, argument)
|
||||
stack[-1] += addnodes.desc_parameter(
|
||||
'', '', addnodes.desc_sig_name(argument, argument))
|
||||
while ends_open:
|
||||
stack.append(addnodes.desc_optional())
|
||||
stack[-2] += stack[-1]
|
||||
@@ -418,11 +433,11 @@ class PyObject(ObjectDescription[Tuple[str, str]]):
|
||||
|
||||
allow_nesting = False
|
||||
|
||||
def get_signature_prefix(self, sig: str) -> str:
|
||||
def get_signature_prefix(self, sig: str) -> List[nodes.Node]:
|
||||
"""May return a prefix to put before the object name in the
|
||||
signature.
|
||||
"""
|
||||
return ''
|
||||
return []
|
||||
|
||||
def needs_arglist(self) -> bool:
|
||||
"""May return true if an empty argument list is to be generated even if
|
||||
@@ -476,7 +491,7 @@ class PyObject(ObjectDescription[Tuple[str, str]]):
|
||||
|
||||
sig_prefix = self.get_signature_prefix(sig)
|
||||
if sig_prefix:
|
||||
signode += addnodes.desc_annotation(sig_prefix, sig_prefix)
|
||||
signode += addnodes.desc_annotation(str(sig_prefix), '', *sig_prefix)
|
||||
|
||||
if prefix:
|
||||
signode += addnodes.desc_addname(prefix, prefix)
|
||||
@@ -507,7 +522,9 @@ class PyObject(ObjectDescription[Tuple[str, str]]):
|
||||
|
||||
anno = self.options.get('annotation')
|
||||
if anno:
|
||||
signode += addnodes.desc_annotation(' ' + anno, ' ' + anno)
|
||||
signode += addnodes.desc_annotation(' ' + anno, '',
|
||||
addnodes.desc_sig_space(),
|
||||
nodes.Text(anno))
|
||||
|
||||
return fullname, prefix
|
||||
|
||||
@@ -609,11 +626,12 @@ class PyFunction(PyObject):
|
||||
'async': directives.flag,
|
||||
})
|
||||
|
||||
def get_signature_prefix(self, sig: str) -> str:
|
||||
def get_signature_prefix(self, sig: str) -> List[nodes.Node]:
|
||||
if 'async' in self.options:
|
||||
return 'async '
|
||||
return [addnodes.desc_sig_keyword('', 'async'),
|
||||
addnodes.desc_sig_space()]
|
||||
else:
|
||||
return ''
|
||||
return []
|
||||
|
||||
def needs_arglist(self) -> bool:
|
||||
return True
|
||||
@@ -670,11 +688,17 @@ class PyVariable(PyObject):
|
||||
typ = self.options.get('type')
|
||||
if typ:
|
||||
annotations = _parse_annotation(typ, self.env)
|
||||
signode += addnodes.desc_annotation(typ, '', nodes.Text(': '), *annotations)
|
||||
signode += addnodes.desc_annotation(typ, '',
|
||||
addnodes.desc_sig_punctuation('', ':'),
|
||||
addnodes.desc_sig_space(), *annotations)
|
||||
|
||||
value = self.options.get('value')
|
||||
if value:
|
||||
signode += addnodes.desc_annotation(value, ' = ' + value)
|
||||
signode += addnodes.desc_annotation(value, '',
|
||||
addnodes.desc_sig_space(),
|
||||
addnodes.desc_sig_punctuation('', '='),
|
||||
addnodes.desc_sig_space(),
|
||||
nodes.Text(value))
|
||||
|
||||
return fullname, prefix
|
||||
|
||||
@@ -698,11 +722,12 @@ class PyClasslike(PyObject):
|
||||
|
||||
allow_nesting = True
|
||||
|
||||
def get_signature_prefix(self, sig: str) -> str:
|
||||
def get_signature_prefix(self, sig: str) -> List[nodes.Node]:
|
||||
if 'final' in self.options:
|
||||
return 'final %s ' % self.objtype
|
||||
return [nodes.Text('final'), addnodes.desc_sig_space(),
|
||||
nodes.Text(self.objtype), addnodes.desc_sig_space()]
|
||||
else:
|
||||
return '%s ' % self.objtype
|
||||
return [nodes.Text(self.objtype), addnodes.desc_sig_space()]
|
||||
|
||||
def get_index_text(self, modname: str, name_cls: Tuple[str, str]) -> str:
|
||||
if self.objtype == 'class':
|
||||
@@ -734,25 +759,27 @@ class PyMethod(PyObject):
|
||||
else:
|
||||
return True
|
||||
|
||||
def get_signature_prefix(self, sig: str) -> str:
|
||||
prefix = []
|
||||
def get_signature_prefix(self, sig: str) -> List[nodes.Node]:
|
||||
prefix: List[nodes.Node] = []
|
||||
if 'final' in self.options:
|
||||
prefix.append('final')
|
||||
prefix.append(nodes.Text('final'))
|
||||
prefix.append(addnodes.desc_sig_space())
|
||||
if 'abstractmethod' in self.options:
|
||||
prefix.append('abstract')
|
||||
prefix.append(nodes.Text('abstract'))
|
||||
prefix.append(addnodes.desc_sig_space())
|
||||
if 'async' in self.options:
|
||||
prefix.append('async')
|
||||
prefix.append(nodes.Text('async'))
|
||||
prefix.append(addnodes.desc_sig_space())
|
||||
if 'classmethod' in self.options:
|
||||
prefix.append('classmethod')
|
||||
prefix.append(nodes.Text('classmethod'))
|
||||
prefix.append(addnodes.desc_sig_space())
|
||||
if 'property' in self.options:
|
||||
prefix.append('property')
|
||||
prefix.append(nodes.Text('property'))
|
||||
prefix.append(addnodes.desc_sig_space())
|
||||
if 'staticmethod' in self.options:
|
||||
prefix.append('static')
|
||||
|
||||
if prefix:
|
||||
return ' '.join(prefix) + ' '
|
||||
else:
|
||||
return ''
|
||||
prefix.append(nodes.Text('static'))
|
||||
prefix.append(addnodes.desc_sig_space())
|
||||
return prefix
|
||||
|
||||
def get_index_text(self, modname: str, name_cls: Tuple[str, str]) -> str:
|
||||
name, cls = name_cls
|
||||
@@ -769,7 +796,7 @@ class PyMethod(PyObject):
|
||||
if 'classmethod' in self.options:
|
||||
return _('%s() (%s class method)') % (methname, clsname)
|
||||
elif 'property' in self.options:
|
||||
return _('%s() (%s property)') % (methname, clsname)
|
||||
return _('%s (%s property)') % (methname, clsname)
|
||||
elif 'staticmethod' in self.options:
|
||||
return _('%s() (%s static method)') % (methname, clsname)
|
||||
else:
|
||||
@@ -831,11 +858,18 @@ class PyAttribute(PyObject):
|
||||
typ = self.options.get('type')
|
||||
if typ:
|
||||
annotations = _parse_annotation(typ, self.env)
|
||||
signode += addnodes.desc_annotation(typ, '', nodes.Text(': '), *annotations)
|
||||
signode += addnodes.desc_annotation(typ, '',
|
||||
addnodes.desc_sig_punctuation('', ':'),
|
||||
addnodes.desc_sig_space(),
|
||||
*annotations)
|
||||
|
||||
value = self.options.get('value')
|
||||
if value:
|
||||
signode += addnodes.desc_annotation(value, ' = ' + value)
|
||||
signode += addnodes.desc_annotation(value, '',
|
||||
addnodes.desc_sig_space(),
|
||||
addnodes.desc_sig_punctuation('', '='),
|
||||
addnodes.desc_sig_space(),
|
||||
nodes.Text(value))
|
||||
|
||||
return fullname, prefix
|
||||
|
||||
@@ -870,19 +904,25 @@ class PyProperty(PyObject):
|
||||
typ = self.options.get('type')
|
||||
if typ:
|
||||
annotations = _parse_annotation(typ, self.env)
|
||||
signode += addnodes.desc_annotation(typ, '', nodes.Text(': '), *annotations)
|
||||
signode += addnodes.desc_annotation(typ, '',
|
||||
addnodes.desc_sig_punctuation('', ':'),
|
||||
addnodes.desc_sig_space(),
|
||||
*annotations)
|
||||
|
||||
return fullname, prefix
|
||||
|
||||
def get_signature_prefix(self, sig: str) -> str:
|
||||
prefix = []
|
||||
def get_signature_prefix(self, sig: str) -> List[nodes.Node]:
|
||||
prefix: List[nodes.Node] = []
|
||||
if 'abstractmethod' in self.options:
|
||||
prefix.append('abstract')
|
||||
prefix.append(nodes.Text('abstract'))
|
||||
prefix.append(addnodes.desc_sig_space())
|
||||
if 'classmethod' in self.options:
|
||||
prefix.append('class')
|
||||
prefix.append(nodes.Text('class'))
|
||||
prefix.append(addnodes.desc_sig_space())
|
||||
|
||||
prefix.append('property')
|
||||
return ' '.join(prefix) + ' '
|
||||
prefix.append(nodes.Text('property'))
|
||||
prefix.append(addnodes.desc_sig_space())
|
||||
return prefix
|
||||
|
||||
def get_index_text(self, modname: str, name_cls: Tuple[str, str]) -> str:
|
||||
name, cls = name_cls
|
||||
|
||||
@@ -45,6 +45,7 @@ if TYPE_CHECKING:
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
default_settings: Dict[str, Any] = {
|
||||
'embed_images': False,
|
||||
'embed_stylesheet': False,
|
||||
'cloak_email_addresses': True,
|
||||
'pep_base_url': 'https://www.python.org/dev/peps/',
|
||||
@@ -54,6 +55,7 @@ default_settings: Dict[str, Any] = {
|
||||
'input_encoding': 'utf-8-sig',
|
||||
'doctitle_xform': False,
|
||||
'sectsubtitle_xform': False,
|
||||
'section_self_link': False,
|
||||
'halt_level': 5,
|
||||
'file_insertion_enabled': True,
|
||||
'smartquotes_locales': [],
|
||||
|
||||
Binary file not shown.
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Arabic (http://www.transifex.com/sphinx-doc/sphinx-1/language/ar/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Bulgarian (http://www.transifex.com/sphinx-doc/sphinx-1/language/bg/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Bengali (http://www.transifex.com/sphinx-doc/sphinx-1/language/bn/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Catalan (http://www.transifex.com/sphinx-doc/sphinx-1/language/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Kaqchikel (http://www.transifex.com/sphinx-doc/sphinx-1/language/cak/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Czech (http://www.transifex.com/sphinx-doc/sphinx-1/language/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Welsh (http://www.transifex.com/sphinx-doc/sphinx-1/language/cy/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -6,14 +6,14 @@
|
||||
# askhl <asklarsen@gmail.com>, 2010-2011
|
||||
# Jakob Lykke Andersen <jakob@caput.dk>, 2014,2016
|
||||
# Joe Hansen <joedalton2@yahoo.dk>, 2016,2019
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2021
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2021
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Sphinx\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Danish (http://www.transifex.com/sphinx-doc/sphinx-1/language/da/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: German (http://www.transifex.com/sphinx-doc/sphinx-1/language/de/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# Translators:
|
||||
# Stelios Vitalis <liberostelios@gmail.com>, 2015
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2021
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2021
|
||||
# tzoumakers tzoumakers <tzoumakersx@gmail.com>, 2019
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -12,7 +12,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Greek (http://www.transifex.com/sphinx-doc/sphinx-1/language/el/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: English (France) (http://www.transifex.com/sphinx-doc/sphinx-1/language/en_FR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: English (United Kingdom) (http://www.transifex.com/sphinx-doc/sphinx-1/language/en_GB/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: English (Hong Kong) (http://www.transifex.com/sphinx-doc/sphinx-1/language/en_HK/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -9,14 +9,14 @@
|
||||
# Guillem Borrell <guillem@torroja.dmt.upm.es>, 2011
|
||||
# Ivan García <ivan.garcia@studio-point.com>, 2019
|
||||
# Leonardo J. Caballero G. <leonardocaballero@gmail.com>, 2013-2018,2020
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2016,2021
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2016,2021
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Sphinx\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Spanish (http://www.transifex.com/sphinx-doc/sphinx-1/language/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Estonian (http://www.transifex.com/sphinx-doc/sphinx-1/language/et/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Basque (http://www.transifex.com/sphinx-doc/sphinx-1/language/eu/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Finnish (http://www.transifex.com/sphinx-doc/sphinx-1/language/fi/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -28,14 +28,14 @@
|
||||
# Olivier Bonaventure <bonaventure@acm.org>, 2019
|
||||
# Pierre Grépon <pgrepon@yahoo.fr>, 2016
|
||||
# Sebastien Douche <sdouche@gmail.com>, 2008
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2016,2020
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2016,2020
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Sphinx\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: French (http://www.transifex.com/sphinx-doc/sphinx-1/language/fr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: French (France) (http://www.transifex.com/sphinx-doc/sphinx-1/language/fr_FR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Hebrew (http://www.transifex.com/sphinx-doc/sphinx-1/language/he/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -6,14 +6,14 @@
|
||||
# Ajay Singh <ajaysajay@gmail.com>, 2019
|
||||
# Purnank H. Ghumalia <me@purnank.in>, 2015-2016
|
||||
# Sumanjali Damarla <damarlasumanjali@gmail.com>, 2020
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2019
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2019
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Sphinx\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Hindi (http://www.transifex.com/sphinx-doc/sphinx-1/language/hi/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Hindi (India) (http://www.transifex.com/sphinx-doc/sphinx-1/language/hi_IN/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Croatian (http://www.transifex.com/sphinx-doc/sphinx-1/language/hr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -15,7 +15,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Hungarian (http://www.transifex.com/sphinx-doc/sphinx-1/language/hu/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Indonesian (http://www.transifex.com/sphinx-doc/sphinx-1/language/id/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Icelandic (http://www.transifex.com/sphinx-doc/sphinx-1/language/is/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -7,14 +7,14 @@
|
||||
# Paolo Cavallini <cavallini@faunalia.it>, 2013-2017
|
||||
# Roland Puntaier <roland.puntaier@chello.at>, 2013
|
||||
# Sandro Dentella <sandro@e-den.it>, 2008
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2016
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Sphinx\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Italian (http://www.transifex.com/sphinx-doc/sphinx-1/language/it/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -7,13 +7,14 @@
|
||||
# Akitoshi Ohta <fire.kuma8@gmail.com>, 2011
|
||||
# tomo, 2018
|
||||
# Hisahiro Ohmura, 2017
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2021
|
||||
# Kouhei Sutou <kou@clear-code.com>, 2011
|
||||
# sutefu7, 2019-2020
|
||||
# shirou - しろう <shirou.faw@gmail.com>, 2017
|
||||
# Taizo Ito <taizo.ito@hennge.com>, 2019
|
||||
# Takayuki Shimizukawa <shimizukawa@gmail.com>, 2013-2016
|
||||
# Takayuki Shimizukawa <shimizukawa@gmail.com>, 2016-2017,2019
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2016-2017,2019
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2016-2017,2019
|
||||
# Tetsuo Koyama <tkoyama010@gmail.com>, 2020
|
||||
# tomo, 2019
|
||||
# shirou - しろう <shirou.faw@gmail.com>, 2014
|
||||
@@ -23,8 +24,8 @@ msgstr ""
|
||||
"Project-Id-Version: Sphinx\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"PO-Revision-Date: 2021-09-30 11:48+0000\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Japanese (http://www.transifex.com/sphinx-doc/sphinx-1/language/ja/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -41,7 +42,7 @@ msgstr "ソースディレクトリが存在しません (%s)"
|
||||
#: sphinx/application.py:161
|
||||
#, python-format
|
||||
msgid "Output directory (%s) is not a directory"
|
||||
msgstr ""
|
||||
msgstr "出力先ディレクトリ (%s) はディレクトリではありません"
|
||||
|
||||
#: sphinx/application.py:165
|
||||
msgid "Source directory and destination directory cannot be identical"
|
||||
@@ -57,7 +58,7 @@ msgid ""
|
||||
"For security reasons, parallel mode is disabled on macOS and python3.8 and "
|
||||
"above. For more details, please read https://github.com/sphinx-"
|
||||
"doc/sphinx/issues/6803"
|
||||
msgstr ""
|
||||
msgstr "セキュリティ上の問題により、macOS で python3.8 以上をお使いの場合はパラレルモードは利用できません。詳しくは https://github.com/sphinx-doc/sphinx/issues/6803 をお読みください。"
|
||||
|
||||
#: sphinx/application.py:228
|
||||
#, python-format
|
||||
@@ -436,7 +437,7 @@ msgstr "enumerable_node %r はすでに登録されています"
|
||||
#: sphinx/registry.py:407
|
||||
#, python-format
|
||||
msgid "math renderer %s is already registered"
|
||||
msgstr ""
|
||||
msgstr "math renderer %s はすでに登録されています"
|
||||
|
||||
#: sphinx/registry.py:420
|
||||
#, python-format
|
||||
@@ -513,7 +514,7 @@ msgstr "テーマパス上のファイル %r は正しいzipファイルでは
|
||||
#: sphinx/theming.py:240
|
||||
msgid ""
|
||||
"sphinx_rtd_theme (< 0.3.0) found. It will not be available since Sphinx-6.0"
|
||||
msgstr ""
|
||||
msgstr "sphinx_rtd_theme (< 0.3.0) が検出されました。Sphinx-6.0 以降では利用できなくなります。"
|
||||
|
||||
#: sphinx/theming.py:245
|
||||
#, python-format
|
||||
@@ -633,7 +634,7 @@ msgstr "書き込むdocname: %s"
|
||||
|
||||
#: sphinx/builders/__init__.py:522 sphinx/builders/singlehtml.py:153
|
||||
msgid "preparing documents"
|
||||
msgstr "preparing documents"
|
||||
msgstr "ドキュメントの出力準備中"
|
||||
|
||||
#: sphinx/builders/_epub_base.py:216
|
||||
#, python-format
|
||||
@@ -667,15 +668,15 @@ msgstr "Pillowがインストールされていません。代わりに画像を
|
||||
|
||||
#: sphinx/builders/_epub_base.py:471
|
||||
msgid "writing mimetype file..."
|
||||
msgstr ""
|
||||
msgstr "mimetype を書き込み中..."
|
||||
|
||||
#: sphinx/builders/_epub_base.py:476
|
||||
msgid "writing META-INF/container.xml file..."
|
||||
msgstr ""
|
||||
msgstr "META-INF/container.xml を書き込み中..."
|
||||
|
||||
#: sphinx/builders/_epub_base.py:504
|
||||
msgid "writing content.opf file..."
|
||||
msgstr ""
|
||||
msgstr "content.opf を書き込み中..."
|
||||
|
||||
#: sphinx/builders/_epub_base.py:530
|
||||
#, python-format
|
||||
@@ -684,7 +685,7 @@ msgstr "不明なmimetype %sのため無視します"
|
||||
|
||||
#: sphinx/builders/_epub_base.py:677
|
||||
msgid "writing toc.ncx file..."
|
||||
msgstr ""
|
||||
msgstr "tox.ncx を書き込み中..."
|
||||
|
||||
#: sphinx/builders/_epub_base.py:702
|
||||
#, python-format
|
||||
@@ -733,7 +734,7 @@ msgstr "ePubファイルは%(outdir)sにあります。"
|
||||
|
||||
#: sphinx/builders/epub3.py:165
|
||||
msgid "writing nav.xhtml file..."
|
||||
msgstr ""
|
||||
msgstr "nav.xhtml を書き込み中..."
|
||||
|
||||
#: sphinx/builders/epub3.py:191
|
||||
msgid "conf value \"epub_language\" (or \"language\") should not be empty for EPUB3"
|
||||
@@ -816,7 +817,7 @@ msgstr "アンカー '%s' が見つかりません"
|
||||
#: sphinx/builders/linkcheck.py:690
|
||||
#, python-format
|
||||
msgid "Failed to compile regex in linkcheck_allowed_redirects: %r %s"
|
||||
msgstr ""
|
||||
msgstr "linkcheck_allowed_redirects 内の正規表現のコンパイルに失敗しました: %r %s"
|
||||
|
||||
#: sphinx/builders/manpage.py:38
|
||||
#, python-format
|
||||
@@ -972,11 +973,11 @@ msgstr "ダウンロードファイル %r をコピーできません: %s"
|
||||
#: sphinx/builders/html/__init__.py:788 sphinx/builders/html/__init__.py:800
|
||||
#, python-format
|
||||
msgid "Failed to copy a file in html_static_file: %s: %r"
|
||||
msgstr ""
|
||||
msgstr "html_static_file 内のファイルのコピーに失敗しました: %s: %r"
|
||||
|
||||
#: sphinx/builders/html/__init__.py:821
|
||||
msgid "copying static files"
|
||||
msgstr ""
|
||||
msgstr "静的ファイルをコピー中"
|
||||
|
||||
#: sphinx/builders/html/__init__.py:837
|
||||
#, python-format
|
||||
@@ -1148,7 +1149,7 @@ msgstr "不明な設定値 latex_elements[%r] は無視されました。"
|
||||
#: sphinx/builders/latex/__init__.py:476
|
||||
#, python-format
|
||||
msgid "Unknown theme option: latex_theme_options[%r], ignored."
|
||||
msgstr ""
|
||||
msgstr "不明なテーマオプション latex_theme_options[%r] は無視されました。"
|
||||
|
||||
#: sphinx/builders/latex/theming.py:91
|
||||
#, python-format
|
||||
@@ -1876,7 +1877,7 @@ msgstr "戻り値の型"
|
||||
#: sphinx/domains/c.py:3225
|
||||
#, python-format
|
||||
msgid "%s (C %s)"
|
||||
msgstr ""
|
||||
msgstr "%s (C %s)"
|
||||
|
||||
#: sphinx/domains/c.py:3732 sphinx/domains/cpp.py:7585
|
||||
msgid "member"
|
||||
@@ -1897,7 +1898,7 @@ msgstr "のマクロ"
|
||||
|
||||
#: sphinx/domains/c.py:3736
|
||||
msgid "struct"
|
||||
msgstr ""
|
||||
msgstr "struct"
|
||||
|
||||
#: sphinx/domains/c.py:3737 sphinx/domains/cpp.py:7583
|
||||
msgid "union"
|
||||
@@ -2119,7 +2120,7 @@ msgstr "%s() (%s の静的メソッド)"
|
||||
#: sphinx/domains/python.py:899
|
||||
#, python-format
|
||||
msgid "%s (%s property)"
|
||||
msgstr ""
|
||||
msgstr "%s (%s のプロパティ)"
|
||||
|
||||
#: sphinx/domains/python.py:1053
|
||||
msgid "Python Module Index"
|
||||
@@ -2143,7 +2144,7 @@ msgstr "の静的メソッド"
|
||||
|
||||
#: sphinx/domains/python.py:1132
|
||||
msgid "property"
|
||||
msgstr ""
|
||||
msgstr "プロパティ"
|
||||
|
||||
#: sphinx/domains/python.py:1190
|
||||
#, python-format
|
||||
@@ -3518,7 +3519,7 @@ msgstr "書き込みエラー: %s, %s"
|
||||
#: sphinx/util/i18n.py:98
|
||||
#, python-format
|
||||
msgid "locale_dir %s does not exists"
|
||||
msgstr ""
|
||||
msgstr "locale_dir %s は存在しません"
|
||||
|
||||
#: sphinx/util/i18n.py:192
|
||||
#, python-format
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Lithuanian (http://www.transifex.com/sphinx-doc/sphinx-1/language/lt/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Latvian (http://www.transifex.com/sphinx-doc/sphinx-1/language/lv/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Macedonian (http://www.transifex.com/sphinx-doc/sphinx-1/language/mk/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Norwegian Bokmål (Norway) (http://www.transifex.com/sphinx-doc/sphinx-1/language/nb_NO/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -4,14 +4,14 @@
|
||||
#
|
||||
# Translators:
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2016
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Sphinx\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Nepali (http://www.transifex.com/sphinx-doc/sphinx-1/language/ne/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -15,7 +15,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Dutch (http://www.transifex.com/sphinx-doc/sphinx-1/language/nl/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
# Translators:
|
||||
# m_aciek <maciej.olko@gmail.com>, 2017-2020
|
||||
# Michael Gielda <michal.gielda@gmail.com>, 2014
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2018
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2018
|
||||
# Tawez, 2013-2019
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Polish (http://www.transifex.com/sphinx-doc/sphinx-1/language/pl/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Portuguese (http://www.transifex.com/sphinx-doc/sphinx-1/language/pt/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# gilberto dos santos alves <gsavix@gmail.com>, 2015-2016
|
||||
# Rafael Fontenelle <rafaelff@gnome.org>, 2019
|
||||
# Rafael Fontenelle <rffontenelle@gmail.com>, 2019-2021
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2016
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Sphinx\n"
|
||||
|
||||
Binary file not shown.
@@ -4,14 +4,14 @@
|
||||
#
|
||||
# Translators:
|
||||
# Pedro Algarvio <pedro@algarvio.me>, 2013
|
||||
# Takeshi KOMIYA <i.tkomiya@gmail.com>, 2016
|
||||
# Komiya Takeshi <i.tkomiya@gmail.com>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Sphinx\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-09-26 00:10+0000\n"
|
||||
"PO-Revision-Date: 2021-09-12 00:10+0000\n"
|
||||
"Last-Translator: Takeshi KOMIYA <i.tkomiya@gmail.com>\n"
|
||||
"Last-Translator: Komiya Takeshi <i.tkomiya@gmail.com>\n"
|
||||
"Language-Team: Portuguese (Portugal) (http://www.transifex.com/sphinx-doc/sphinx-1/language/pt_PT/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user