The import hook now decorates dataclass __init__ methods (#48)

This commit is contained in:
Patrick Kidger
2022-11-16 13:38:04 -08:00
committed by GitHub
parent 784aa78f7c
commit a220df9964
8 changed files with 110 additions and 29 deletions
+2
View File
@@ -168,6 +168,8 @@ The import hook can be applied to multiple packages via
install_import_hook(["foo", "bar.baz"], ...)
```
The import hook will automatically decorate all functions, and the `__init__` method of dataclasses.
**Example: writing an end-user script**
```python