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

Remove __all__ to discourage wildcard imports #539

Closed
janosh opened this issue Sep 30, 2023 · 1 comment · Fixed by #540
Closed

Remove __all__ to discourage wildcard imports #539

janosh opened this issue Sep 30, 2023 · 1 comment · Fixed by #540
Labels
discussion API design discussions ecosystem Issues concerning the larger MP ecosystem ux User experience

Comments

@janosh
Copy link
Member

janosh commented Sep 30, 2023

I think wildcard imports are a bad practice and a feature I wish Python didn't support.

By defining __all__ across atomate2 modules, we're encouraging this practice. It's additional maintenance burden to keep the list of strings in sync with the actual symbol names in a module. It would also increase ecosystem consistency to remove them since other MP repos do not use __all__.

@janosh janosh added discussion API design discussions ux User experience ecosystem Issues concerning the larger MP ecosystem labels Sep 30, 2023
@chiang-yuan
Copy link
Contributor

Fewer lines are always better 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion API design discussions ecosystem Issues concerning the larger MP ecosystem ux User experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants