[openstack-dev] [Horizon] "import only module" message and #noqa
rbryant at redhat.com
Fri Jan 3 16:01:10 UTC 2014
On 01/03/2014 10:35 AM, Radomir Dopieralski wrote:
> On 03/01/14 16:18, Russell Bryant wrote:
>> On 01/03/2014 10:10 AM, Radomir Dopieralski wrote:
>>> I think that we can actually do a little bit better and remove many of
>>> the #noqa tags without forfeiting automatic checking. I submitted a
>>> patch: https://review.openstack.org/#/c/64832/
>>> This basically adds a h302_exceptions option to tox.ini, that lets us
>>> specify which names are allowed to be imported. For example, we can do:
>>> h302_exceptions = django.conf.settings,
>>> To have settings, _ and everything from urlresolvers importable without
>>> the need for the #noqa tag.
>>> Of course every project can add their own names there, depending what
>>> they need.
>> Isn't that what "import_exceptions" is for? For example, we have this
>> in nova:
>> import_exceptions = nova.openstack.common.gettextutils._
> No exactly, as this will disable all import checks, just like # noqa.
Ah, makes sense. Thanks.
More information about the OpenStack-dev