MarcoReidelbach / MaRDMO-Plugin

Export Plugin for RDMO
Apache License 2.0
2 stars 2 forks source link

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

Open MyPyDavid opened 2 months ago

MyPyDavid commented 2 months ago

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 commented 2 months ago

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