Closed en-GB closed 2 years ago
Is it possible to "find" these functions (I think it's also fine to expect that this function exists), e.g.,
extract_otto
in the fileotto
dynamically and directly return the mapping instead of return thenames
?
yes. i wasnt comfortable with having magic names like that. i could use a decorator maybe
I pushed a suggestions. It does not need any indirections or decorators and has much fewer lines of code.
It just relies on file names, e.g., otto.py
or zalando.py
used as table names and they need to expose the function extract
(no suffix). WDYT?
by indirection you mean the import *
in extractors/__init__.py
?
i still feel like thats better than using import_module
closed as discussed
removes some manual steps to adding new shops