importhook icon indicating copy to clipboard operation
importhook copied to clipboard

Python package for executing functions when packages are imported

Results 4 importhook issues
Sort by recently updated
recently updated
newest added

c.f. issue #6: https://github.com/brettlangdon/importhook/issues/6 for more details/examples Certain packages that are 'namespace packages' don't return a loader object when they're, well, loaded. However in that case `importhook` still wraps spec.loader...

The following code: ``` import importhook import snowflake ``` Fails for me with: ``` File :1027, in _find_and_load(name, import_) File :1006, in _find_and_load_unlocked(name, import_) File :672, in _load_unlocked(spec) File :632,...

First off -- thank you for `importhook`! It fills what feels like a surprising gap in Python's module import machinery. Unfortunately, I'm seeing that some modules may fail to load...

Hello👋, this PR removes the unnecessary `@functools.wraps(func)` decorator in the `on_import` function. The specific line is redundant for the following reasons: - The variable`func` is None, and passing `None` to...