-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Pre-emptively expand
__all__
values and wildcard imports befor…
…e firing the `on_package_loaded` event Extensions hooking the `on_package_loaded` event might trigger computation of resolved bases and inherited members. If a base class is wildcard imported, and wildcard were not expanded, the base class can't be resolved, and inherited members won't be fetched. Since both are cached, that makes them incorrect for the rest of the of the process. So now we try to expand wildcard imports as much as possible, without loading external packages. The best solution would be to stop caching resolved bases and inherited members, but I worry of the performance cost. Accessing members of a class using the subscript syntax would compute the resolved bases, MRO and inherited members each time.
- Loading branch information
Showing
1 changed file
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters