This is about python long import like this:
from aaa.bbb.ccc.ddd.eee.fff.ggg.hhh.iii.jjj.kkk.lll.mmm.nnn.ooo import xxx
The length between 'from' and 'import' is already above than 80 characters, is there any better pythonic ways to deal with it?
You can always wrap lines using the \
character at the end of the line.
from a.very.long.and.unconventional.structure.\
and.name import foo
For multiple statements to import after the from x import
statement, you can use parentheses and wrap inside these parentheses without a newline escape:
from foo.bar import (test,
and,
others)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With