8000 refactor: Don't sort inventories when reading them, it's useless · mkdocstrings/mkdocstrings@3ed3453 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ed3453

Browse files
committed
refactor: Don't sort inventories when reading them, it's useless
1 parent 9397460 commit 3ed3453

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mkdocstrings/inventory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ def parse_sphinx(cls, in_file: BinaryIO, *, domain_filter: Collection[str] = ())
150150
domain_filter: A collection of domain values to allow (and filter out all other ones).
151151
152152
Returns:
153-
An `Inventory` containing the collected `InventoryItem`s.
153+
An inventory containing the collected items.
154154
"""
155155
for _ in range(4):
156156
in_file.readline()
157157
lines = zlib.decompress(in_file.read()).splitlines()
158158
items = [InventoryItem.parse_sphinx(line.decode("utf8")) for line in lines]
159159
if domain_filter:
160160
items = [item for item in items if item.domain in domain_filter]
161-
return cls(sorted(items, key=lambda item: (item.domain, item.name)))
161+
return cls(items)

0 commit comments

Comments
 (0)
0