Skip to content

Commit

Permalink
fix: Always resolve aliases when checking APIs
Browse files Browse the repository at this point in the history
This is required to be able to descend into aliases. We explicitly tell Griffe to use its default behavior for resolving external aliases, i.e. only resolve aliases pointing to private sibling modules (like ast -> _ast).
  • Loading branch information
pawamoy committed Dec 3, 2024
1 parent 6d6c996 commit 0b4f0da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/_griffe/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ def check(
search_paths=search_paths,
allow_inspection=allow_inspection,
force_inspection=force_inspection,
resolve_aliases=True,
resolve_external=None,
)
if base_ref:
new_package = load_git(
Expand All @@ -493,6 +495,8 @@ def check(
allow_inspection=allow_inspection,
force_inspection=force_inspection,
find_stubs_package=find_stubs_package,
resolve_aliases=True,
resolve_external=None,
)
else:
new_package = load(
Expand All @@ -503,6 +507,8 @@ def check(
allow_inspection=allow_inspection,
force_inspection=force_inspection,
find_stubs_package=find_stubs_package,
resolve_aliases=True,
resolve_external=None,
)

# Find and display API breakages.
Expand Down

0 comments on commit 0b4f0da

Please sign in to comment.