python-aspectlib
python-aspectlib copied to clipboard
Pass many objects as target argument in aspectlib.weave method
Hello, I have the following piece of code:
if __name__ == '__main__':
weaving_list = [ShannonDBClient,
columns.create_columns_in_bulk,
columns.create_single_column]
with weave(weaving_list, print_debug_log, lazy=True):
loop = asyncio.get_event_loop()
loop.run_until_complete(main(args))
I would like to know if it is possible, instead I pass every method name in columns module, I just pass the module name, to reduce the weaving_list variable size.
The methods option is supported for modules. Looks like I documented this wrong (states that it's only for classes) - leave this issue open.