<div dir="ltr">Hi,<div>in project maintained by integration team we tried to adhere to some styling rules while writing python code, one of these was related to the import lines. After a lot of time doing this manually, we discovered isort ( <a href="https://pypi.python.org/pypi/isort/4.2.5">https://pypi.python.org/pypi/isort/4.2.5</a> )</div><div><br></div><div>We&#39;re using it before we push our code to gerrit and a few days ago I sent a patch for the python code within ovirt-engine: <a href="https://gerrit.ovirt.org/61964">https://gerrit.ovirt.org/61964</a></div><div><br></div><div>The configuration we&#39;re currently using is:</div><div><br></div><div><span style="color:rgb(53,53,53);font-family:monospace;white-space:pre">$ cat ~/.isort.cfg
[settings]
line_length=79
known_standard_library=configparser,Cheetah.Template
force_single_line=True
default_section=FIRSTPARTY
known_otopi=otopi
known_host_deploy=ovirt_host_deploy
known_ovirt_engine=ovirt_engine
known_ovirt_engine_setup=ovirt_engine_setup
known_ovirt_setup_lib=ovirt_setup_lib
known_vdsm=vdsm
known_ovirt_hosted_engine_setup=ovirt_hosted_engine_setup
sections=FUTURE,STDLIB,FIRSTPARTY,OTOPI,VDSM,HOST_DEPLOY,OVIRT_ENGINE,OVIRT_ENGINE_SETUP,OVIRT_SETUP_LIB,OVIRT_HOSTED_ENGINE_SETUP,THIRDPARTY,LOCALFOLDER
lines_between_types=2</span></div><div><font color="#353535" face="monospace"><span style="white-space:pre"><br></span></font></div>It has been proposed to add &#39;isort --check-only&#39; in check-patch.for python projects in addition to pep8 style checking.<br><br>It has also been proposed to reach consensus on isort configuration so all the python code<br>within ovirt project will have same styling.<br><br>I&#39;d like to get some feedback about these proposal in order to decide how to procede.<br><br>Thanks,<div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Sandro Bonazzola<br>Better technology. Faster innovation. Powered by community collaboration.<br>See how it works at <a href="http://redhat.com" target="_blank">redhat.com</a><br></div></div></div></div>
</div></div>