summaryrefslogtreecommitdiff
path: root/sphinx/ext/intersphinx.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-01-12 13:03:53 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-01-12 13:03:53 +0900
commit38d6c34f35c60689f22d1f71ce650ca1e3005ec4 (patch)
tree0677416d0de03a53ee7d348289d8560e511c2bed /sphinx/ext/intersphinx.py
parentef912eb9a3e923e80d5c6a08fda4597a65d591aa (diff)
parent478306e052d9711170b1fbe63635edef02853484 (diff)
downloadsphinx-git-38d6c34f35c60689f22d1f71ce650ca1e3005ec4.tar.gz
Merge branch 'stable'
Diffstat (limited to 'sphinx/ext/intersphinx.py')
-rw-r--r--sphinx/ext/intersphinx.py12
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: