Closed vmsh0 closed 1 year ago
Not sure why some tests are failing, is it due to my changes? Will check more later.
Relative imports can be handy, as long as you know what you do. I made the experience, that in more nested projects, many people fall into an ImportError pit (but that is another story).
Anyway - back to the topic: In our case I am not so happy, because of types
. types
is a buitin module itself, but also a module in our repo. If we want to use relative imports, a refactoring has to happen to differ both things better for readability (and maybe future conflicts) reasons. Other opinions are welcomed :)
Anyway - back to the topic: In our case I am not so happy, because of
types
.types
is a buitin module itself, but also a module in our repo. If we want to use relative imports, a refactoring has to happen to differ both things better for readability (and maybe future conflicts) reasons. Other opinions are welcomed :)
Very good point, but as long as the built-in types
is not used in the project I don't see it as a terrible thing. (at least compared to what it is already)
I've changed all the types
imports to drop the prefix and just explicitly import the names.
Not sure whether this is welcome, but we're using is as an internal patch and I thought it would be nice to offer it here.
This basically allows more freedom installing and moving the snap7 module around the filesystem for peculiar setups, as far as I know it's a pretty common practice for Python libraries.