Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass many objects as target argument in aspectlib.weave method #17

Open
anthonylouisbsb opened this issue Jun 10, 2020 · 1 comment
Open

Comments

@anthonylouisbsb
Copy link

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.

@ionelmc
Copy link
Owner

ionelmc commented Jun 10, 2020

The methods option is supported for modules. Looks like I documented this wrong (states that it's only for classes) - leave this issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants