<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 9, 2013 at 1:28 PM, Kieran Spear <span dir="ltr"><<a href="mailto:kispear@gmail.com" target="_blank">kispear@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi all,<br>
<br>
There's a review up to make Horizon pass H304 (no relative imports):<br>
<br>
<a href="https://review.openstack.org/#/c/35664/" target="_blank">https://review.openstack.org/#/c/35664/</a><br>
<br>
Old-style relative imports are dangerous, but I can't think of a good enough reason to forbid new-style imports, e.g.:<br>
<br>
from .views import IndexView<br>
<br>
instead of<br>
<br>
from openstack_dashboard.dashboards.project.images_and_snapshots.views \<br>
      import IndexView<br>
<br>
particularly in Horizon where nesting is deep and you otherwise end up with many imports that won't fit into 80 characters. I think if we're going to make the change above the benefits would need to outweigh the effect on readability.<br>


<br>
There's some discussion on the review already, but I'd like to hear from a more general audience. Thoughts?<br></blockquote><div><br></div><div><br></div><div><a href="http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Imports">http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Imports</a><div>

<br></div><div>"<span style="color:rgb(51,51,51);font-family:sans-serif;font-size:13px">Do not use relative names in imports. Even if the module is in the same package, use the full package name. This helps prevent unintentionally importing a package twice."</span></div>

<div class="gmail_extra"><br></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Cheers,<br>
Kieran<br>
<br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div></div>