-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Handle partials as functions while inspecting
This doesn't solve the issue that `functools.partial` does not set the `__module__` attribute of the resulting partial to be the module of the wrapped function, which means that the inspector always treats partials as aliases (since it finds out they were defined in the `functools` module). This issue cannot be fixed on our side, because special-casing partials to decide that they are always defined in the current module would not work for partials imported from elsewhere. Therefore, devs *must* set the `__module__` attribute of partials themselves.
- Loading branch information
Showing
2 changed files
with
23 additions
and
5 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
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