Skip to content

docs: clarify name-vs-resolved-path in syft-restrict import resolution#9467

Merged
koenvanderveen merged 1 commit into
devfrom
koen/restrict-resolve-comment
Jul 23, 2026
Merged

docs: clarify name-vs-resolved-path in syft-restrict import resolution#9467
koenvanderveen merged 1 commit into
devfrom
koen/restrict-resolve-comment

Conversation

@koenvanderveen

Copy link
Copy Markdown
Collaborator

Follow-up to #9461. Adds explanatory comments (no behavior change) clarifying the two roles that meet in import-binding resolution:

  • key = the name the private code writes at the call site (jnp, or the root jax)
  • value = the fully-qualified path prefix the policy is matched against

Expands _Checker._resolve()'s docstring to show how the two import forms fill these in (alias rewrites to a longer path; plain import a.b binds the root to itself because the call already spells the full path), and adds a one-line pointer from scan_file (where the bindings are built) to _resolve (where they're consumed).

@koenvanderveen
koenvanderveen merged commit 6d10d42 into dev Jul 23, 2026
20 checks passed
@koenvanderveen
koenvanderveen deleted the koen/restrict-resolve-comment branch July 23, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant