diff options
| author | Georg Brandl <georg@python.org> | 2010-08-22 11:36:08 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-08-22 11:36:08 +0200 |
| commit | 5978c17aed477cc2bbab7eae86bb8b18367c426e (patch) | |
| tree | 8a31a3695744a106791724453db559985f874c8e /sphinx/domains/python.py | |
| parent | f160503120e0f72ea8b70bb850c92b8023bb9f6e (diff) | |
| download | sphinx-5978c17aed477cc2bbab7eae86bb8b18367c426e.tar.gz | |
Docstring harmonization.
Diffstat (limited to 'sphinx/domains/python.py')
| -rw-r--r-- | sphinx/domains/python.py | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index cd87bfbd..77604dec 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -63,22 +63,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 @@ -167,9 +166,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): @@ -548,9 +545,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:] == '()': |
