Open aroberge opened 2 years ago
Is this why simple examples fail on Python 3.10? This for instance:
import ideas
def my_transform(source, **_kwargs):
return source
def add_hook(**_kwargs):
hook = ideas.import_hook.create_hook(transform_source=my_transform)
return hook
my_var = "test value"
$ python3 -m ideas test -a transforms
Module <module 'transforms' from '/home/tkcook/git/idea/transforms.py'> does not contain a function named add_hook
Relevant versions:
$ venv/bin/pip freeze
ideas==0.1.3
token-utils==0.1.8
$ python3 --version
Python 3.10.6
No, never mind, that's because an AttributeError
in your add_hook
function has the same effect as a missing add_hook
function.
Try to upload the newest version (0.1.4) - just uploaded to pypi.
Also, instead of importing ideas and trying to call ideas.import_hook...
, do
from ideas import import_hook
Goals for new version:
*kwargs
to future-proofing transformers.unparse
by default.