Get rid of #noqa from imports
Use import_exceptions to allow the imports that we need. Also, upgraded the version of hacking from an ancient one to 0.8 Change-Id: Ia9fbb851f61d08be791f1bea4057797c314e9c28
This commit is contained in:
parent
2b1d93168f
commit
7712bc059f
@ -2,7 +2,7 @@
|
||||
pep8==1.4.5
|
||||
pyflakes==0.7.2
|
||||
flake8==2.0
|
||||
hacking>=0.5.3,<0.6
|
||||
hacking>=0.8.0,<0.9
|
||||
# Testing Requirements
|
||||
coverage>=3.6
|
||||
django-nose
|
||||
|
21
tox.ini
21
tox.ini
@ -31,4 +31,23 @@ downloadcache = ~/cache/pip
|
||||
|
||||
[flake8]
|
||||
builtins = _
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,
|
||||
build,panel_template,dash_template,local_settings.py
|
||||
|
||||
[hacking]
|
||||
import_exceptions = collections.defaultdict,
|
||||
django.conf.settings,
|
||||
django.core.urlresolvers.reverse,
|
||||
django.core.urlresolvers.reverse_lazy,
|
||||
django.template.loader.render_to_string,
|
||||
django.utils.datastructures.SortedDict,
|
||||
django.utils.encoding.force_unicode,
|
||||
django.utils.html.conditional_escape,
|
||||
django.utils.html.escape,
|
||||
django.utils.http.urlencode,
|
||||
django.utils.safestring.mark_safe,
|
||||
django.utils.translation.pgettext_lazy,
|
||||
django.utils.translation.ugettext_lazy,
|
||||
django.utils.translation.ungettext_lazy,
|
||||
operator.attrgetter,
|
||||
StringIO.StringIO
|
||||
|
@ -13,7 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
import netaddr
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from tuskar_ui.infrastructure.nodes import tables
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.core import urlresolvers
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import tables as horizon_tables
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from tuskar_ui.infrastructure.nodes import tables
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.core import urlresolvers
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import tables as horizon_tables
|
||||
|
@ -13,7 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.template import defaultfilters as filters
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon import tables
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
import os
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon.test.settings import * # noqa
|
||||
from horizon.utils import secret_key as secret_key_utils
|
||||
|
Loading…
Reference in New Issue
Block a user