Re:Boring Python: Code Quality
by makapuf on Tuesday December 20, 2022 @05:26AM
(#34063997)
If your import statements are indented, they must be in control statements (try/except or conditional imports, I fail to see why you would put those in a loop) thus they will be difficult to reorder if you import another module (with different name or stdlib status) on import error.
[ Parent
| on HN ]
I'm not sure what you mean here, but package names can be indented without conditionals or tries, as in...
from application.module.modules import (
Model1, Model2, Model3, Model4, Model5, Model6
)
iSort handles this fine if you're using spaces for indentation.> I have no idea how to <pre> on HN
Two or more leading spaces on each line.[1]
[1] https://news.ycombinator.com/formatdoc