From 0b4f0da1658a3c4877a2519447288c1247694a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Tue, 3 Dec 2024 17:01:31 +0100 Subject: [PATCH] fix: Always resolve aliases when checking APIs 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). --- src/_griffe/cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/_griffe/cli.py b/src/_griffe/cli.py index 30088764..dd105f54 100644 --- a/src/_griffe/cli.py +++ b/src/_griffe/cli.py @@ -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( @@ -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( @@ -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.