mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '2.1.1' into 2.0
This commit is contained in:
commit
e0eb86224d
7
CHANGES
7
CHANGES
@ -33,6 +33,8 @@ Dependencies
|
||||
Incompatible changes
|
||||
--------------------
|
||||
|
||||
* #6447: autodoc: Stop to generate document for undocumented module variables
|
||||
|
||||
Deprecated
|
||||
----------
|
||||
|
||||
@ -45,7 +47,12 @@ Bugs fixed
|
||||
* #6442: LaTeX: admonitions of :rst:dir:`note` type can get separated from
|
||||
immediately preceding section title by pagebreak
|
||||
* #6448: autodoc: crashed when autodocumenting classes with ``__slots__ = None``
|
||||
* #6451: autodoc: generates docs for "optional import"ed modules as variables
|
||||
* #6452: autosummary: crashed when generating document of properties
|
||||
* #6455: napoleon: docstrings for properties are not processed
|
||||
* #6436: napoleon: "Unknown target name" error if variable name ends with
|
||||
underscore
|
||||
* #6440: apidoc: missing blank lines between modules
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -250,7 +250,7 @@ the source and the compiled catalogs.
|
||||
|
||||
When a new locale is submitted, add a new directory with the ISO 639-1 language
|
||||
identifier and put ``sphinx.po`` in there. Don't forget to update the possible
|
||||
values for :confval:`language` in ``doc/config.rst``.
|
||||
values for :confval:`language` in ``doc/usage/configuration.rst``.
|
||||
|
||||
The Sphinx core messages can also be translated on `Transifex
|
||||
<https://www.transifex.com/>`_. There exists a client tool named ``tx`` in the
|
||||
|
@ -310,7 +310,7 @@ you can select a language here by its language code. Sphinx will then
|
||||
translate text that it generates into that language.
|
||||
|
||||
For a list of supported codes, see
|
||||
http://sphinx-doc.org/config.html#confval-language.'''))
|
||||
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language.'''))
|
||||
d['language'] = do_prompt(__('Project language'), 'en')
|
||||
if d['language'] == 'en':
|
||||
d['language'] = None
|
||||
|
@ -549,10 +549,8 @@ class Documenter:
|
||||
|
||||
if self.analyzer:
|
||||
attr_docs = self.analyzer.find_attr_docs()
|
||||
tagorder = self.analyzer.tagorder
|
||||
else:
|
||||
attr_docs = {}
|
||||
tagorder = {}
|
||||
|
||||
# process members and determine which to skip
|
||||
for (membername, member) in members:
|
||||
@ -582,13 +580,12 @@ class Documenter:
|
||||
membername in self.options.special_members:
|
||||
keep = has_doc or self.options.undoc_members
|
||||
elif (namespace, membername) in attr_docs:
|
||||
has_doc = bool(attr_docs[namespace, membername])
|
||||
if want_all and membername.startswith('_'):
|
||||
# ignore members whose name starts with _ by default
|
||||
keep = has_doc and self.options.private_members
|
||||
keep = self.options.private_members
|
||||
else:
|
||||
# keep documented attributes
|
||||
keep = has_doc
|
||||
keep = True
|
||||
isattr = True
|
||||
elif want_all and membername.startswith('_'):
|
||||
# ignore members whose name starts with _ by default
|
||||
@ -597,8 +594,6 @@ class Documenter:
|
||||
else:
|
||||
# ignore undocumented members if :undoc-members: is not given
|
||||
keep = has_doc or self.options.undoc_members
|
||||
# module top level item or not
|
||||
isattr = membername in tagorder
|
||||
|
||||
# give the user a chance to decide whether this member
|
||||
# should be skipped
|
||||
@ -1296,10 +1291,6 @@ class DataDocumenter(ModuleLevelDocumenter):
|
||||
return self.get_attr(self.parent or self.object, '__module__', None) \
|
||||
or self.modname
|
||||
|
||||
def get_doc(self, encoding=None, ignore=1):
|
||||
# type: (str, int) -> List[List[str]]
|
||||
return []
|
||||
|
||||
|
||||
class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter): # type: ignore
|
||||
"""
|
||||
|
@ -328,6 +328,9 @@ class GoogleDocstring:
|
||||
|
||||
def _escape_args_and_kwargs(self, name):
|
||||
# type: (str) -> str
|
||||
if name.endswith('_'):
|
||||
name = name[:-1] + r'\_'
|
||||
|
||||
if name[:2] == '**':
|
||||
return r'\*\*' + name[2:]
|
||||
elif name[:1] == '*':
|
||||
@ -555,7 +558,7 @@ class GoogleDocstring:
|
||||
# type: () -> None
|
||||
self._parsed_lines = self._consume_empty()
|
||||
|
||||
if self._name and (self._what == 'attribute' or self._what == 'data'):
|
||||
if self._name and self._what in ('attribute', 'data', 'property'):
|
||||
# Implicit stop using StopIteration no longer allowed in
|
||||
# Python 3.7; see PEP 479
|
||||
res = [] # type: List[str]
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,8 +1448,8 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
msgstr "\nWe xetz'ib'an ri wuj pa jun ch'abäl man Q'anch' ta,\nyatikïr nacha' jun chïk runuk'unem ch'ab'äl wawe' chi Sphinx tiq'ax\nruch'abäl ri wuj xtik'iyij pa ri ch'ab'äl re.\n\nChi natz'u rucholajem runuk'unem ch'ab'äl k'o chïk pa Sphinx, tab'e pa\nhttp://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr "\nWe xetz'ib'an ri wuj pa jun ch'abäl man Q'anch' ta,\nyatikïr nacha' jun chïk runuk'unem ch'ab'äl wawe' chi Sphinx tiq'ax\nruch'abäl ri wuj xtik'iyij pa ri ch'ab'äl re.\n\nChi natz'u rucholajem runuk'unem ch'ab'äl k'o chïk pa Sphinx, tab'e pa\nhttps://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
msgid "Project language"
|
||||
|
@ -1449,7 +1449,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1449,7 +1449,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1450,7 +1450,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1451,7 +1451,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1454,8 +1454,8 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
msgstr "\nSi los documentos están escritos en un idioma distinto al Inglés,\npuedes seleccionar un idioma aqui a través de su código. Sphinx traducirá\nlos textos que genere en dicho idioma.\n\nPara una lista de los códigos soportados visita: \nhttp://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr "\nSi los documentos están escritos en un idioma distinto al Inglés,\npuedes seleccionar un idioma aqui a través de su código. Sphinx traducirá\nlos textos que genere en dicho idioma.\n\nPara una lista de los códigos soportados visita: \nhttps://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
msgid "Project language"
|
||||
|
@ -1451,8 +1451,8 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
msgstr "\nKui su dokumendid pole kirjutatud inglise keeles, siis võid siin määrata\nkeele vastava keelekoodi abil. Sel juhul tõlgib Sphinx enda genereeritud\nteksti vastavasse keelde.\n\nToetatud keelekoodide kohta vaata\nhttp://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr "\nKui su dokumendid pole kirjutatud inglise keeles, siis võid siin määrata\nkeele vastava keelekoodi abil. Sel juhul tõlgib Sphinx enda genereeritud\nteksti vastavasse keelde.\n\nToetatud keelekoodide kohta vaata\nhttps://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
msgid "Project language"
|
||||
|
@ -1449,7 +1449,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1447,7 +1447,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1465,8 +1465,8 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
msgstr "\nSi le documents doit être écrit dans une autre langue que l'anglais, vous pouvez choisir une langue ici en saisissant son code. Sphinx traduira le texte qu'il génère dans cette langue. Pour une liste des codes supportés : http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr "\nSi le documents doit être écrit dans une autre langue que l'anglais, vous pouvez choisir une langue ici en saisissant son code. Sphinx traduira le texte qu'il génère dans cette langue. Pour une liste des codes supportés : https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
msgid "Project language"
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1449,8 +1449,8 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
msgstr "\nयदि प्रलेखों को अंग्रेजी के अलावा अन्य किसी भाषा में लिखा जाना है,\nतो यहाँ पर आप भाषा का कूटशब्द दे सकते हैं. स्फिंक्स तदपुरांत,\nजो वाक्यांश बनाता है उसे उस भाषा में अनुवादित करेगा.\n\nमान्य भाषा कूटशब्द सूची यहाँ पर देखें\nhttp://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr "\nयदि प्रलेखों को अंग्रेजी के अलावा अन्य किसी भाषा में लिखा जाना है,\nतो यहाँ पर आप भाषा का कूटशब्द दे सकते हैं. स्फिंक्स तदपुरांत,\nजो वाक्यांश बनाता है उसे उस भाषा में अनुवादित करेगा.\n\nमान्य भाषा कूटशब्द सूची यहाँ पर देखें\nhttps://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
msgid "Project language"
|
||||
|
@ -1447,7 +1447,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1452,7 +1452,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1451,7 +1451,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1452,7 +1452,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1460,8 +1460,8 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
msgstr "\nドキュメントを英語以外の言語で書く場合は、\n 言語コードで言語を選択できます。Sphinx は生成したテキストをその言語に翻訳します。\n\nサポートされているコードのリストについては、\nhttp://sphinx-doc.org/config.html#confval-language を参照してください。"
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr "\nドキュメントを英語以外の言語で書く場合は、\n 言語コードで言語を選択できます。Sphinx は生成したテキストをその言語に翻訳します。\n\nサポートされているコードのリストについては、\nhttps://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language を参照してください。"
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
msgid "Project language"
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1447,7 +1447,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1447,7 +1447,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1449,7 +1449,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1453,7 +1453,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1451,8 +1451,8 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
msgstr "\nJeśli dokumenty mają być pisane w języku innym niż angielski,\nmożesz tutaj wybrać język przez jego kod. Sphinx następnie\nprzetłumaczy tekst, który generuje, na ten język.\n\nListę wspieranych kodów znajdziesz na\nhttp://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr "\nJeśli dokumenty mają być pisane w języku innym niż angielski,\nmożesz tutaj wybrać język przez jego kod. Sphinx następnie\nprzetłumaczy tekst, który generuje, na ten język.\n\nListę wspieranych kodów znajdziesz na\nhttps://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
msgid "Project language"
|
||||
|
@ -1447,7 +1447,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1451,7 +1451,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1449,7 +1449,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1449,7 +1449,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1453,7 +1453,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1450,7 +1450,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1447,7 +1447,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1461,7 +1461,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1447,7 +1447,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1447,7 +1447,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1447,7 +1447,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1449,7 +1449,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1447,7 +1447,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1448,7 +1448,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -1456,8 +1456,8 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
msgstr "\n如果用英语以外的语言编写文档,你可以在此按语言代码选择语种。\nSphinx 会把内置文本翻译成相应语言的版本。\n\n支持的语言代码列表见:\nhttp://sphinx-doc.org/config.html#confval-language。"
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr "\n如果用英语以外的语言编写文档,你可以在此按语言代码选择语种。\nSphinx 会把内置文本翻译成相应语言的版本。\n\n支持的语言代码列表见:\nhttps://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language。"
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
msgid "Project language"
|
||||
|
@ -1453,7 +1453,7 @@ msgid ""
|
||||
"translate text that it generates into that language.\n"
|
||||
"\n"
|
||||
"For a list of supported codes, see\n"
|
||||
"http://sphinx-doc.org/config.html#confval-language."
|
||||
"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language."
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/cmd/quickstart.py:314
|
||||
|
@ -357,6 +357,17 @@ class VariableCommentPicker(ast.NodeVisitor):
|
||||
except TypeError:
|
||||
pass # this assignment is not new definition!
|
||||
|
||||
def visit_Try(self, node):
|
||||
# type: (ast.Try) -> None
|
||||
"""Handles Try node and processes body and else-clause.
|
||||
|
||||
.. note:: pycode parser ignores objects definition in except-clause.
|
||||
"""
|
||||
for subnode in node.body:
|
||||
self.visit(subnode)
|
||||
for subnode in node.orelse:
|
||||
self.visit(subnode)
|
||||
|
||||
def visit_ClassDef(self, node):
|
||||
# type: (ast.ClassDef) -> None
|
||||
"""Handles ClassDef node and set context."""
|
||||
|
@ -1,4 +0,0 @@
|
||||
#: docstring for CONSTANT1
|
||||
CONSTANT1 = ""
|
||||
|
||||
CONSTANT2 = ""
|
@ -1347,30 +1347,6 @@ def test_partialmethod(app):
|
||||
assert list(actual) == expected
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('setup_test')
|
||||
def test_module_variables():
|
||||
options = {"members": None,
|
||||
"undoc-members": True}
|
||||
actual = do_autodoc(app, 'module', 'target.module', options)
|
||||
assert list(actual) == [
|
||||
'',
|
||||
'.. py:module:: target.module',
|
||||
'',
|
||||
'',
|
||||
'.. py:data:: CONSTANT1',
|
||||
' :module: target.module',
|
||||
" :annotation: = ''",
|
||||
'',
|
||||
' docstring for CONSTANT1',
|
||||
' ',
|
||||
'',
|
||||
'.. py:data:: CONSTANT2',
|
||||
' :module: target.module',
|
||||
" :annotation: = ''",
|
||||
'',
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='pycode-egg')
|
||||
def test_autodoc_for_egged_code(app):
|
||||
options = {"members": None,
|
||||
|
@ -1351,8 +1351,8 @@ arg_ : type
|
||||
"""
|
||||
|
||||
expected = """
|
||||
:ivar arg_: some description
|
||||
:vartype arg_: type
|
||||
:ivar arg\\_: some description
|
||||
:vartype arg\\_: type
|
||||
"""
|
||||
|
||||
config = Config(napoleon_use_ivar=True)
|
||||
|
@ -149,6 +149,21 @@ def test_complex_assignment_py3():
|
||||
assert parser.definitions == {}
|
||||
|
||||
|
||||
def test_assignment_in_try_clause():
|
||||
source = ('try:\n'
|
||||
' a = None #: comment\n'
|
||||
'except:\n'
|
||||
' b = None #: ignored\n'
|
||||
'else:\n'
|
||||
' c = None #: comment\n')
|
||||
parser = Parser(source)
|
||||
parser.parse()
|
||||
assert parser.comments == {('', 'a'): 'comment',
|
||||
('', 'c'): 'comment'}
|
||||
assert parser.deforders == {'a': 0,
|
||||
'c': 1}
|
||||
|
||||
|
||||
def test_obj_assignment():
|
||||
source = ('obj = SomeObject() #: some object\n'
|
||||
'obj.attr = 1 #: attr1\n'
|
||||
|
Loading…
Reference in New Issue
Block a user