diff options
author | Georg Brandl <georg@python.org> | 2015-03-08 16:59:27 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2015-03-08 16:59:27 +0100 |
commit | ba9dcaac5120f58c3cc0bc455b4beceab3a4abd9 (patch) | |
tree | 1f04a07d99ba7cf41d726a3d561eae90165553ce /sphinx/domains/python.py | |
parent | d0efb42a4179f331dd67d4d301c81b2c01d8e386 (diff) | |
download | sphinx-git-ba9dcaac5120f58c3cc0bc455b4beceab3a4abd9.tar.gz |
more pep8 fixes
Diffstat (limited to 'sphinx/domains/python.py')
-rw-r--r-- | sphinx/domains/python.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 9a6a6c5c2..c9a03de2b 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -492,8 +492,8 @@ class PyXRefRole(XRefRole): refnode['py:module'] = env.ref_context.get('py:module') refnode['py:class'] = env.ref_context.get('py:class') if not has_explicit_title: - title = title.lstrip('.') # only has a meaning for the target - target = target.lstrip('~') # only has a meaning for the title + title = title.lstrip('.') # only has a meaning for the target + target = target.lstrip('~') # only has a meaning for the title # if the first character is a tilde, don't display the module/class # parts of the contents if title[0:1] == '~': @@ -629,10 +629,10 @@ class PythonDomain(Domain): ] def clear_doc(self, docname): - for fullname, (fn, _) in list(self.data['objects'].items()): + for fullname, (fn, _l) in list(self.data['objects'].items()): if fn == docname: del self.data['objects'][fullname] - for modname, (fn, _, _, _) in list(self.data['modules'].items()): + for modname, (fn, _x, _x, _x) in list(self.data['modules'].items()): if fn == docname: del self.data['modules'][modname] @@ -680,8 +680,8 @@ class PythonDomain(Domain): # "fuzzy" searching mode searchname = '.' + name matches = [(oname, objects[oname]) for oname in objects - if oname.endswith(searchname) - and objects[oname][1] in objtypes] + if oname.endswith(searchname) and + objects[oname][1] in objtypes] else: # NOTE: searching for exact match, object type is not considered if name in objects: @@ -694,15 +694,15 @@ class PythonDomain(Domain): elif modname and modname + '.' + name in objects: newname = modname + '.' + name elif modname and classname and \ - modname + '.' + classname + '.' + name in objects: + modname + '.' + classname + '.' + name in objects: newname = modname + '.' + classname + '.' + name # special case: builtin exceptions have module "exceptions" set elif type == 'exc' and '.' not in name and \ - 'exceptions.' + name in objects: + 'exceptions.' + name in objects: newname = 'exceptions.' + name # special case: object methods elif type in ('func', 'meth') and '.' not in name and \ - 'object.' + name in objects: + 'object.' + name in objects: newname = 'object.' + name if newname is not None: matches.append((newname, objects[newname])) |