summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-02-01 22:33:50 +0900
committerGitHub <noreply@github.com>2019-02-01 22:33:50 +0900
commitc577f85846fb016bb87f4d5c3fa5effe9f45722e (patch)
treeda89c2824582a3656b5742f02108912c851678dc
parente6d93e05128aedb563232a3e03b874c0d6154cae (diff)
parent4ad11820026602dda80ba62d94814d963d0ea463 (diff)
downloadsphinx-git-c577f85846fb016bb87f4d5c3fa5effe9f45722e.tar.gz
Merge pull request #5997 from tk0miya/fix_flake8
Fix flake8 violations
-rw-r--r--.travis.yml2
-rw-r--r--sphinx/__init__.py2
-rw-r--r--sphinx/util/inventory.py10
-rw-r--r--tox.ini2
4 files changed, 8 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index f156d59d7..89ba9eb96 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,7 +37,7 @@ matrix:
env: TOXENV=docs
- python: '3.6'
env: TOXENV=mypy
- - python: '3.6'
+ - python: '2.7'
env: TOXENV=flake8
- language: node_js
diff --git a/sphinx/__init__.py b/sphinx/__init__.py
index 66065ce35..52b8d40a3 100644
--- a/sphinx/__init__.py
+++ b/sphinx/__init__.py
@@ -25,7 +25,7 @@ from .deprecation import RemovedInSphinx20Warning
if False:
# For type annotation
# note: Don't use typing.TYPE_CHECK here (for py27 and py34).
- from typing import Any # NOQA
+ from typing import Any, List # NOQA
# by default, all DeprecationWarning under sphinx package will be emit.
diff --git a/sphinx/util/inventory.py b/sphinx/util/inventory.py
index 1f0530d82..5e3923abc 100644
--- a/sphinx/util/inventory.py
+++ b/sphinx/util/inventory.py
@@ -143,11 +143,11 @@ class InventoryFile(object):
if not m:
continue
name, type, prio, location, dispname = m.groups()
- if type == 'py:module' and type in invdata and \
- name in invdata[type]: # due to a bug in 1.1 and below,
- # two inventory entries are created
- # for Python modules, and the first
- # one is correct
+ if type == 'py:module' and type in invdata and name in invdata[type]:
+ # due to a bug in 1.1 and below,
+ # two inventory entries are created
+ # for Python modules, and the first
+ # one is correct
continue
if location.endswith(u'$'):
location = location[:-1] + name
diff --git a/tox.ini b/tox.ini
index f189a778c..697265d62 100644
--- a/tox.ini
+++ b/tox.ini
@@ -29,7 +29,7 @@ commands=
pytest --durations 25 {posargs}
[testenv:flake8]
-basepython = python3
+basepython = python2
description =
Run style checks.
commands =