summaryrefslogtreecommitdiff
path: root/sphinx/pycode
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-01-12 12:54:02 +0900
committerGitHub <noreply@github.com>2017-01-12 12:54:02 +0900
commit478306e052d9711170b1fbe63635edef02853484 (patch)
tree502a9e495cef7d748a5a439de35bdb4647f5f138 /sphinx/pycode
parentd170862866a576cf342d27074d009e869e3670c4 (diff)
parent76ecccf8af86568cde5310638b4ac21c1aee0042 (diff)
downloadsphinx-git-478306e052d9711170b1fbe63635edef02853484.tar.gz
Merge pull request #3327 from tk0miya/flake8
Update flake8 rules
Diffstat (limited to 'sphinx/pycode')
-rw-r--r--sphinx/pycode/__init__.py2
-rw-r--r--sphinx/pycode/nodes.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py
index baf5c0068..d1d151f6f 100644
--- a/sphinx/pycode/__init__.py
+++ b/sphinx/pycode/__init__.py
@@ -364,4 +364,4 @@ if __name__ == '__main__':
pprint.pprint(ma.find_tags())
x3 = time.time()
# print nodes.nice_repr(ma.parsetree, number2name)
- print("tokenizing %.4f, parsing %.4f, finding %.4f" % (x1-x0, x2-x1, x3-x2))
+ print("tokenizing %.4f, parsing %.4f, finding %.4f" % (x1 - x0, x2 - x1, x3 - x2))
diff --git a/sphinx/pycode/nodes.py b/sphinx/pycode/nodes.py
index ee40f3c0d..e3a1bc9f6 100644
--- a/sphinx/pycode/nodes.py
+++ b/sphinx/pycode/nodes.py
@@ -39,7 +39,7 @@ class BaseNode(object):
if child is self:
if i == 0:
return None
- return self.parent.children[i-1]
+ return self.parent.children[i - 1]
def get_next_sibling(self):
"""Return next child in parent's children, or None."""
@@ -48,7 +48,7 @@ class BaseNode(object):
for i, child in enumerate(self.parent.children):
if child is self:
try:
- return self.parent.children[i+1]
+ return self.parent.children[i + 1]
except IndexError:
return None