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

suggestion for improvement: refactor imports of constants across the modules #45

Open
MyPyDavid opened this issue Aug 19, 2024 · 1 comment

Comments

@MyPyDavid
Copy link

It is not really good practice to use import *, in places where you don't specifically need it, https://peps.python.org/pep-0008/#imports

You don't need to import each key/value pair as a single variable from each module everywhere, I would suggest to refactor those in a type of Python data structure. It can be a simple dict, but also a dataclass https://docs.python.org/3.10/library/dataclasses.html?highlight=dataclasses or enum https://docs.python.org/3.10/library/enum.html?highlight=strenum

@MarcoReidelbach
Copy link
Owner

refactored most import statements, still to do for MaRDI Portal Item / Property Ids

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