Skip to content

Commit f5fb111

Browse files
authored
Ignore intersphinx std:doc objects from DocItem generation (#3446)
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.
1 parent 7d586a2 commit f5fb111

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bot/exts/info/doc/_cog.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626

2727
log = get_logger(__name__)
2828

29+
# groups to ignore from parsing
30+
IGNORE_GROUPS = (
31+
"std:doc",
32+
)
33+
2934
# symbols with a group contained here will get the group prefixed on duplicates
3035
FORCE_PREFIX_GROUPS = (
3136
"term",
@@ -80,6 +85,8 @@ def update_single(self, package_name: str, base_url: str, inventory: InventoryDi
8085

8186
for group, items in inventory.items():
8287
for symbol_name, relative_doc_url in items:
88+
if group in IGNORE_GROUPS:
89+
continue
8390

8491
# e.g. get 'class' from 'py:class'
8592
group_name = group.split(":")[1]

0 commit comments

Comments
 (0)