Merge pull request #134 from tkf/docfix

Fix typo in doc and add some links
This commit is contained in:
David Halter
2013-02-15 10:00:37 -08:00
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -127,8 +127,8 @@ Docstrings (docstrings.py)
.. _refactoring: .. _refactoring:
Refactoring (docstrings.py) Refactoring (refactoring.py)
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: refactoring .. automodule:: refactoring
+4 -4
View File
@@ -4,8 +4,8 @@ Docstrings are another source of information for functions and classes.
parsing is much easier. There are two different types of docstrings that |jedi| parsing is much easier. There are two different types of docstrings that |jedi|
understands: understands:
- Sphinx - `Sphinx <http://sphinx-doc.org/markup/desc.html#info-field-lists>`_
- Epidoc - `Epydoc <http://epydoc.sourceforge.net/manual-fields.html>`_
For example, the sphinx annotation ``:type foo: str`` clearly states that the For example, the sphinx annotation ``:type foo: str`` clearly states that the
type of ``foo`` is ``str``. type of ``foo`` is ``str``.
@@ -23,12 +23,12 @@ import parsing
DOCSTRING_PARAM_PATTERNS = [ DOCSTRING_PARAM_PATTERNS = [
r'\s*:type\s+%s:\s*([^\n]+)', # Sphinx r'\s*:type\s+%s:\s*([^\n]+)', # Sphinx
r'\s*@type\s+%s:\s*([^\n]+)', # Epidoc r'\s*@type\s+%s:\s*([^\n]+)', # Epydoc
] ]
DOCSTRING_RETURN_PATTERNS = [ DOCSTRING_RETURN_PATTERNS = [
re.compile(r'\s*:rtype:\s*([^\n]+)', re.M), # Sphinx re.compile(r'\s*:rtype:\s*([^\n]+)', re.M), # Sphinx
re.compile(r'\s*@rtype:\s*([^\n]+)', re.M), # Epidoc re.compile(r'\s*@rtype:\s*([^\n]+)', re.M), # Epydoc
] ]
REST_ROLE_PATTERN = re.compile(r':[^`]+:`([^`]+)`') REST_ROLE_PATTERN = re.compile(r':[^`]+:`([^`]+)`')