Relative/absolute imports policy (e.g. in AnalysisBase)?
#4434
Replies: 2 comments
-
|
I think its just a hangover from different people's styles. I don't mind either way really. |
Beta Was this translation helpful? Give feedback.
-
|
I think relative imports are generally better in a package; in principle the However, the In the absence of rules I'd
(Btw, when we say "MDAnalysis core" we mean more than just "MDAnalysis.core", it's really "everything except analysis.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I noticed that some core code uses relative imports (like
core/universe.py), and some -- absolute (likeanalysis/base.py):On my system (vscode + pylance), the latter results in "module not found" warnings and poorer autocomplete and typechecking. Is there a particular reason on why it should be relative that I don't know, like some CI/CD things?
Beta Was this translation helpful? Give feedback.
All reactions