summaryrefslogtreecommitdiff
path: root/sphinx/domains/python.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-01-04 00:35:27 +0100
committerGeorg Brandl <georg@python.org>2011-01-04 00:35:27 +0100
commit902f69759d2844def54b6182d875da737e1f8f3a (patch)
treeeed02f129e674a183307a35cd383b9c6f369b6bf /sphinx/domains/python.py
parent77a016a404d48cc44026d0bec691e967e92e58bf (diff)
parent5c8a206dd399745c289d37ff4d8408c1834ea24b (diff)
downloadsphinx-902f69759d2844def54b6182d875da737e1f8f3a.tar.gz
merge with 1.0
Diffstat (limited to 'sphinx/domains/python.py')
-rw-r--r--sphinx/domains/python.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py
index 59ff551b..4c970048 100644
--- a/sphinx/domains/python.py
+++ b/sphinx/domains/python.py
@@ -110,22 +110,21 @@ class PyObject(ObjectDescription):
]
def get_signature_prefix(self, sig):
- """
- May return a prefix to put before the object name in the signature.
+ """May return a prefix to put before the object name in the
+ signature.
"""
return ''
def needs_arglist(self):
- """
- May return true if an empty argument list is to be generated even if
+ """May return true if an empty argument list is to be generated even if
the document contains none.
"""
return False
def handle_signature(self, sig, signode):
- """
- Transform a Python signature into RST nodes.
- Returns (fully qualified name of the thing, classname if any).
+ """Transform a Python signature into RST nodes.
+
+ Return (fully qualified name of the thing, classname if any).
If inside a class, the current class name is handled intelligently:
* it is stripped from the displayed name if present
@@ -195,9 +194,7 @@ class PyObject(ObjectDescription):
return fullname, name_prefix
def get_index_text(self, modname, name):
- """
- Return the text for the index entry of the object.
- """
+ """Return the text for the index entry of the object."""
raise NotImplementedError('must be implemented in subclasses')
def add_target_and_index(self, name_cls, sig, signode):
@@ -576,9 +573,8 @@ class PythonDomain(Domain):
del self.data['modules'][modname]
def find_obj(self, env, modname, classname, name, type, searchmode=0):
- """
- Find a Python object for "name", perhaps using the given module and/or
- classname. Returns a list of (name, object entry) tuples.
+ """Find a Python object for "name", perhaps using the given module
+ and/or classname. Returns a list of (name, object entry) tuples.
"""
# skip parens
if name[-2:] == '()':