News for hackers. Stuff that matters.
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.
Re:Boring Python: Code Quality by drcongo on Tuesday December 20, 2022 @05:44AM (#34064126)
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.
Re:Boring Python: Code Quality by eCa on Tuesday December 20, 2022 @05:52AM (#34064197)
> I have no idea how to <pre> on HN

  Two or more leading spaces on each line.[1]
[1] https://news.ycombinator.com/formatdoc
Re:Boring Python: Code Quality by drcongo on Tuesday December 20, 2022 @06:04AM (#34064275)
Thank you, fixed it up.