Skip to content

Commit

Permalink
fix: Prevent alias resolution error when searching for anchors
Browse files Browse the repository at this point in the history
Issue #64: #64
  • Loading branch information
pawamoy committed Apr 2, 2023
1 parent 1a131d7 commit a190e2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mkdocstrings_handlers/python/handler.py
Expand Up @@ -272,6 +272,8 @@ def collect(self, identifier: str, config: Mapping[str, Any]) -> CollectorItem:
doc_object = self._modules_collection[identifier]
except KeyError as error:
raise CollectionError(f"{identifier} could not be found") from error
except AliasResolutionError as error:
raise CollectionError(str(error)) from error

if not unknown_module:
with suppress(AliasResolutionError):
Expand Down

0 comments on commit a190e2c

Please sign in to comment.