From 926de6759dea54d5093cbe6289a682bcd5aa5aa9 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Tue, 25 Nov 2025 23:08:56 +0000 Subject: [PATCH] Ignore intersphinx std:doc objects from DocItem generation These items caused issues that led to spam in the #dev-log channel about stale inventories (though inventories were not stale). All std:doc items are accompanied by a module item or a label item that contains actual contents that are compatible with our doc command, so hopefully ignoring these items will not cause any reduced functionality of the command. When testing locally this removes all symbols with empty symbol IDs and stops the warning spam to #dev-log. --- bot/exts/info/doc/_cog.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bot/exts/info/doc/_cog.py b/bot/exts/info/doc/_cog.py index bf27da4ab2..680c3c3d6f 100644 --- a/bot/exts/info/doc/_cog.py +++ b/bot/exts/info/doc/_cog.py @@ -26,6 +26,11 @@ log = get_logger(__name__) +# groups to ignore from parsing +IGNORE_GROUPS = ( + "std:doc", +) + # symbols with a group contained here will get the group prefixed on duplicates FORCE_PREFIX_GROUPS = ( "term", @@ -80,6 +85,8 @@ def update_single(self, package_name: str, base_url: str, inventory: InventoryDi for group, items in inventory.items(): for symbol_name, relative_doc_url in items: + if group in IGNORE_GROUPS: + continue # e.g. get 'class' from 'py:class' group_name = group.split(":")[1]