Skip to content

Commit

Permalink
intersphinx role, fix flake8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobandersen committed Jan 16, 2022
1 parent 9a3f2b8 commit 941db55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sphinx/ext/intersphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ def run(self) -> Tuple[List[Node], List[system_message]]:
assert self.name == self.orig_name.lower()
inventory, name_suffix = self.get_inventory_and_name_suffix(self.orig_name)
if inventory and not inventory_exists(self.env, inventory):
logger.warning(__('inventory for external cross-reference not found: %s'), inventory,
location=(self.env.docname, self.lineno))
logger.warning(__('inventory for external cross-reference not found: %s'),
inventory, location=(self.env.docname, self.lineno))
return [], []

role_name = self.get_role_name(name_suffix)
Expand All @@ -522,7 +522,7 @@ def get_inventory_and_name_suffix(self, name: str) -> Tuple[Optional[str], Optio
# inv+role
# inv+domain:role
inventory = inv_names[0]
name = name[len(inventory)+1:]
name = name[len(inventory) + 1:]
return inventory, name

def get_role_name(self, name: str) -> Optional[Tuple[str, str]]:
Expand Down

0 comments on commit 941db55

Please sign in to comment.