diff --git a/sphinx/util/inventory.py b/sphinx/util/inventory.py index 1a739bf21..786898181 100644 --- a/sphinx/util/inventory.py +++ b/sphinx/util/inventory.py @@ -136,11 +136,11 @@ class InventoryFile: 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('$'): location = location[:-1] + name