hacking: Specify white list rules in noqa explicity

If 'noqa' is specified all hacking checks are disabled.
It is better to ignore specific rules explicitly rather than
ignoring all. The recent flake8 supports this [1].

[1] http://flake8.pycqa.org/en/stable/user/ignoring-errors.html

Change-Id: I0a907a22f99282a44526817346383f391d94b29e
This commit is contained in:
Shu Muto 2017-06-22 14:22:09 +09:00
parent ccefad947e
commit 0b05dfcc0e
17 changed files with 19 additions and 19 deletions

View File

@ -15,7 +15,7 @@
import os
import sys
from django.core.management import execute_from_command_line # noqa
from django.core.management import execute_from_command_line
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE",

View File

@ -15,4 +15,4 @@ Javascript code.
"""
# import REST API modules here
from senlin_dashboard.api.rest import senlin # noqa
from senlin_dashboard.api.rest import senlin # noqa: F401

View File

@ -19,7 +19,7 @@ from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import forms
from horizon import messages
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized # noqa: F401
from senlin_dashboard.api import senlin

View File

@ -13,7 +13,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from senlin_dashboard import api
from senlin_dashboard.test import helpers as test

View File

@ -11,7 +11,7 @@
# limitations under the License.
from django.conf import settings
from django.conf.urls import url # noqa
from django.conf.urls import url
from django.utils.translation import ugettext_lazy as _
from horizon.browsers.views import AngularIndexView

View File

@ -19,7 +19,7 @@ from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import forms
from horizon import messages
from horizon.utils.memoized import memoized # noqa
from horizon.utils.memoized import memoized # noqa: F401
from senlin_dashboard.api import senlin

View File

@ -15,7 +15,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from senlin_dashboard import api
from senlin_dashboard.test import helpers as test

View File

@ -11,7 +11,7 @@
# limitations under the License.
from django.conf import settings
from django.conf.urls import url # noqa
from django.conf.urls import url
from django.utils.translation import ugettext_lazy as _
from horizon.browsers import views

View File

@ -15,7 +15,7 @@ import yaml
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from senlin_dashboard import api
from senlin_dashboard.test import helpers as test

View File

@ -11,7 +11,7 @@
# limitations under the License.
from django.conf import settings
from django.conf.urls import url # noqa
from django.conf.urls import url
from django.utils.translation import ugettext_lazy as _
from horizon.browsers import views

View File

@ -15,7 +15,7 @@ from django.utils.translation import ugettext_lazy as _
import horizon
# import REST API modules here
from senlin_dashboard.api.rest import senlin # noqa
from senlin_dashboard.api.rest import senlin # noqa: F401
from senlin_dashboard.cluster import dashboard

View File

@ -15,7 +15,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from senlin_dashboard import api
from senlin_dashboard.test import helpers as test

View File

@ -11,7 +11,7 @@
# limitations under the License.
from django.conf import settings
from django.conf.urls import url # noqa
from django.conf.urls import url
from django.utils.translation import ugettext_lazy as _
from horizon.browsers.views import AngularIndexView

View File

@ -13,7 +13,7 @@
from django.core.urlresolvers import reverse
from django import http
from mox3.mox import IsA # noqa
from mox3.mox import IsA
from senlin_dashboard import api
from senlin_dashboard.test import helpers as test

View File

@ -11,12 +11,12 @@
# limitations under the License.
from django.conf import settings
from django.conf.urls import url # noqa
from django.conf.urls import url
from django.utils.translation import ugettext_lazy as _
from horizon.browsers.views import AngularIndexView
from senlin_dashboard.api import rest # noqa
from senlin_dashboard.api import rest # noqa: F401
from senlin_dashboard.cluster.receivers import views as legacyViews

View File

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from horizon.test.settings import * # noqa
from openstack_dashboard.test.settings import * # noqa
from horizon.test.settings import * # noqa: F403,H303
from openstack_dashboard.test.settings import * # noqa: F403,H303
INSTALLED_APPS = list(INSTALLED_APPS)
INSTALLED_APPS.append('senlin_dashboard.cluster')

View File

@ -20,7 +20,7 @@ import setuptools
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
import multiprocessing # noqa: F401
except ImportError:
pass