-
Notifications
You must be signed in to change notification settings - Fork 187
[FEAT] Add the ability to pass arguments to all packages in load_extensions method #1552
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
Comments
I want to make sure I understand your request right: what exactly are you wanting a If you don't mind extending off of this example, it would help me: def load_extension(
self,
*packages: str,
**kwargs
):
for (...):
...
extensions = [
f.replace(os.path.sep, ".").replace(".py", "")
for f in glob.glob(pattern, recursive=kwargs.get("recursive", False))
] The only thing I can think of is replicating the existing logic we use for |
|
I've thought about this for a while now - I'm 👎 for the feature request. These are my personal reasons for why:
There are things I'm in support of:
I understand if these points may be debated, but I overall see no benefit in adding something (I believe to be) redundant. Passing |
Problem Description
The load_extensions method was recently added, however it does not have the ability to pass arguments through to the setup function.
Proposed Solution
Change recursive key word into **kwargs and use kwargs.get(). Remove this then pass through the rest of the kwargs through to the setup function.
Alternatives Considered
Change *packages: str into packages: tuple[str] and pass through *args to the setup function.
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: