Fix flake8 violations

This commit is contained in:
Takeshi KOMIYA 2019-02-01 21:46:53 +09:00
parent e6d93e0512
commit cc70c2def1
2 changed files with 6 additions and 6 deletions

View File

@ -25,7 +25,7 @@ from .deprecation import RemovedInSphinx20Warning
if False: if False:
# For type annotation # For type annotation
# note: Don't use typing.TYPE_CHECK here (for py27 and py34). # 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. # by default, all DeprecationWarning under sphinx package will be emit.

View File

@ -143,11 +143,11 @@ class InventoryFile(object):
if not m: if not m:
continue continue
name, type, prio, location, dispname = m.groups() name, type, prio, location, dispname = m.groups()
if type == 'py:module' and type in invdata and \ if type == 'py:module' and type in invdata and name in invdata[type]:
name in invdata[type]: # due to a bug in 1.1 and below, # due to a bug in 1.1 and below,
# two inventory entries are created # two inventory entries are created
# for Python modules, and the first # for Python modules, and the first
# one is correct # one is correct
continue continue
if location.endswith(u'$'): if location.endswith(u'$'):
location = location[:-1] + name location = location[:-1] + name