diff options
Diffstat (limited to 'sphinx/ext/intersphinx.py')
-rw-r--r-- | sphinx/ext/intersphinx.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sphinx/ext/intersphinx.py b/sphinx/ext/intersphinx.py index af39722ce..fac640e00 100644 --- a/sphinx/ext/intersphinx.py +++ b/sphinx/ext/intersphinx.py @@ -83,7 +83,7 @@ def read_inventory_v1(f, uri, join): return invdata -def read_inventory_v2(f, uri, join, bufsize=16*1024): +def read_inventory_v2(f, uri, join, bufsize=16 * 1024): # type: (IO, unicode, Callable, int) -> Inventory invdata = {} # type: Inventory line = f.readline() @@ -109,7 +109,7 @@ def read_inventory_v2(f, uri, join, bufsize=16*1024): lineend = buf.find(b'\n') while lineend != -1: yield buf[:lineend].decode('utf-8') - buf = buf[lineend+1:] + buf = buf[lineend + 1:] lineend = buf.find(b'\n') assert not buf @@ -134,7 +134,7 @@ def read_inventory_v2(f, uri, join, bufsize=16*1024): return invdata -def read_inventory(f, uri, join, bufsize=16*1024): +def read_inventory(f, uri, join, bufsize=16 * 1024): # type: (IO, unicode, Callable, int) -> Inventory line = f.readline().rstrip().decode('utf-8') if line == '# Sphinx inventory version 1': @@ -371,9 +371,9 @@ def missing_reference(app, env, node, contnode): (domain == 'std' and node['reftype'] == 'keyword'): # use whatever title was given, but strip prefix title = contnode.astext() - if in_set and title.startswith(in_set+':'): - newnode.append(contnode.__class__(title[len(in_set)+1:], - title[len(in_set)+1:])) + if in_set and title.startswith(in_set + ':'): + newnode.append(contnode.__class__(title[len(in_set) + 1:], + title[len(in_set) + 1:])) else: newnode.append(contnode) else: |