Implement import hook to transform modules on load
Apply an arbitrary transformation to module source code at load time before compiling it to bytecode and executing it, of the form: transform(source : str, name : str, filename : str) -> str | AST The result is passed to builtin compile() function wich accepts both str and AST objects.
Showing
my2to3/__init__.py
0 → 100644
my2to3/hook.py
0 → 100644
tests/context.py
0 → 100644
tests/sample/__init__.py
0 → 100644
tests/sample/sample.py
0 → 100644
tests/test_hook.py
0 → 100644
Please register or sign in to comment