From 078aaf5f13e01b99619763e4f4eae6665ec2da26 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Fri, 30 Oct 2020 00:51:47 +0900 Subject: [PATCH] napoleon: Remove unused function --- sphinx/ext/napoleon/docstring.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index b5c34a479..20d9e1b9e 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -1188,25 +1188,6 @@ class NumpyDocstring(GoogleDocstring): items.append((name, list(rest), role)) del rest[:] - def search_inventory(inventory, name, hint=None): - roles = list(inventory.keys()) - if hint is not None: - preferred = [ - role - for role in roles - if role.split(":", 1)[-1].startswith(hint) - ] - roles = preferred + [role for role in roles if role not in preferred] - - for role in roles: - objects = inventory[role] - found = objects.get(name, None) - if found is not None: - domain, role = role.split(":", 1) - return role - - return None - def translate(func, description, role): translations = self._config.napoleon_type_aliases if role is not None or not translations: