from sqlalchemy import Column
from sqlalchemy import or_
In the above cases, I100 warning may be issued, and the warning cannot be set to 0 no matter how the order is changed, and as a result, the code below is settled.
from sqlalchemy import Column
from sqlalchemy import or_
Since this kind of thing often occurs in other packages, I investigated it, but in such a case, it seems that the cause is that it is specified by a path that can simply access the package.
In the case of the above example, it seems that this is the correct one.
from sqlalchemy import Column
from sqlalchemy.sql.expression import or_
Since the above is the official path, it should not be lined up with sqlalchemy.
It's a hassle to write so far, so as a result, I settled down in this way.
from sqlalchemy import Column
from sqlalchemy.sql import or_
Be careful about paths that can be abbreviated (only when using import order).
Recommended Posts