8000 refactor: Return anchors as a set · mkdocstrings/python@e2b820c · GitHub
[go: up one dir, main page]

Skip to content

Commit e2b820c

Browse files
committed
refactor: Return anchors as a set
1 parent c5a30ce commit e2b820c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mkdocstrings_handlers/python/handler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,11 @@ def update_env(self, md: Markdown, config: dict) -> None: # noqa: D102 (ignore
328328
self.env.filters["format_signature"] = rendering.do_format_signature
329329
self.env.filters["filter_objects"] = rendering.do_filter_objects
330330

331-
def get_anchors(self, data: CollectorItem) -> list[str]: # noqa: D102 (ignore missing docstring)
331+
def get_anchors(self, data: CollectorItem) -> set[str]: # noqa: D102 (ignore missing docstring)
332332
try:
333-
return list({data.path, data.canonical_path, *data.aliases})
333+
return {data.path, data.canonical_path, *data.aliases}
334334
except AliasResolutionError:
335-
return [data.path]
335+
return {data.path}
336336

337337

338338
def get_handler(

0 commit comments

Comments
 (0)
0