diff options
| author | Georg Brandl <georg@python.org> | 2010-01-13 20:58:44 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-01-13 20:58:44 +0100 |
| commit | 74b451ccfed4818eac625ef08a2abb5fd0845c29 (patch) | |
| tree | 73218ba4df8cd1d78798586d030dcda6a84a90ec /sphinx/directives | |
| parent | 15a2437628ac1803eeb62ff9033c78e17e3f6110 (diff) | |
| download | sphinx-74b451ccfed4818eac625ef08a2abb5fd0845c29.tar.gz | |
Rename parse_signature() to handle_signature(); allows more to happen. Record module and class name in Python object descriptions.
Diffstat (limited to 'sphinx/directives')
| -rw-r--r-- | sphinx/directives/__init__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sphinx/directives/__init__.py b/sphinx/directives/__init__.py index 5ffce16b..80f62202 100644 --- a/sphinx/directives/__init__.py +++ b/sphinx/directives/__init__.py @@ -190,7 +190,7 @@ class ObjectDescription(Directive): return [strip_backslash_re.sub('', sig.strip()) for sig in self.arguments[0].split('\n')] - def parse_signature(self, sig, signode): + def handle_signature(self, sig, signode): """ Parse the signature *sig* into individual nodes and append them to *signode*. If ValueError is raised, parsing is aborted and the whole @@ -242,8 +242,10 @@ class ObjectDescription(Directive): signode['first'] = False node.append(signode) try: - # name can also be a tuple, e.g. (classname, objname) - name = self.parse_signature(sig, signode) + # name can also be a tuple, e.g. (classname, objname); + # this is strictly domain-specific (i.e. no assumptions may + # be made in this base class) + name = self.handle_signature(sig, signode) except ValueError, err: # signature parsing failed signode.clear() |
