Skip to content

Conversation

connernilsen
Copy link
Contributor

Summary:
This diff mostly includes updates to an interface and the affected tests.

This diff stores found namespace results, and returns them yfrom the end of find_import_filtered if no higher-priority FindResult is found sooner. This is because results in search-path, typeshed, and site-package-path can override a previously found namespace package if they contain a file or regular package match, and we shouldn't just early return from a single find component if we find a namespace result.

Differential Revision: D83847654

Summary: This diff replaces the requirement to copy paths around to get their `ModuleStyle` with a function that quickly returns it.

Differential Revision: D83847656
Summary:
This diff pushes the conversion of a `FindResult` to a `ModulePath` from within `find_module_components` up to `find_module`.

This is necessary because `NamespacePackage`s will need special handling, since they can be overridden at any point by a higher priority find result later in the module find logic. In the next diff, we check for namespace modules and handle them.

Differential Revision: D83847655
Summary:
This diff mostly includes updates to an interface and the affected tests.

This diff stores found namespace results, and returns them  yfrom the end of `find_import_filtered` if no higher-priority `FindResult` is found sooner. This is because results in `search-path`, `typeshed`, and `site-package-path` can override a previously found namespace package if they contain a file or regular package match, and we shouldn't just early return from a single find component if we find a namespace result.

Differential Revision: D83847654
Copy link

meta-codesync bot commented Oct 3, 2025

@connernilsen has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83847654.

Copy link

meta-codesync bot commented Oct 3, 2025

@connernilsen has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83847654.

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