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:
parent
ccefad947e
commit
0b05dfcc0e
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue