Fix up flake8 runtime configuration, do a bit of flake8 work as it

relates to pyflakes)
This commit is contained in:
Matthew Jones
2015-02-05 10:40:22 -05:00
parent 6a77c5dbab
commit 888ae53027
7 changed files with 39 additions and 42 deletions

View File

@@ -12,7 +12,7 @@ __all__ = ['__version__']
# Check for the presence/absence of "devonly" module to determine if running
# from a source code checkout or release packaage.
try:
import awx.devonly
import awx.devonly # noqa
MODE = 'development'
except ImportError: # pragma: no cover
MODE = 'production'
@@ -57,7 +57,7 @@ def prepare_env():
import six
sys.modules['django.utils.six'] = sys.modules['six']
django.utils.six = sys.modules['django.utils.six']
from django.utils import six
from django.utils import six # noqa
# Use the AWX_TEST_DATABASE_* environment variables to specify the test
# database settings to use when management command is run as an external
# program via unit tests.

View File

@@ -4,18 +4,15 @@
# Python
import inspect
import logging
import json
import time
# Django
from django.http import Http404
from django.conf import settings
from django.contrib.auth.models import User
from django.db import connection
from django.shortcuts import get_object_or_404
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.utils.timezone import now
# Django REST Framework
from rest_framework.authentication import get_authorization_header
@@ -27,8 +24,8 @@ from rest_framework import status
from rest_framework import views
# AWX
from awx.main.models import *
from awx.main.utils import *
from awx.main.models import * # noqa
from awx.main.utils import * # noqa
__all__ = ['APIView', 'GenericAPIView', 'ListAPIView', 'SimpleListAPIView',
'ListCreateAPIView', 'SubListAPIView', 'SubListCreateAPIView',

View File

@@ -1,20 +1,17 @@
# Copyright (c) 2014 AnsibleWorks, Inc.
# All Rights Reserved.
from django.conf import settings
from django.conf.urls import *
from django.conf.urls import url, patterns, include
handler403 = 'awx.main.views.handle_403'
handler404 = 'awx.main.views.handle_404'
handler500 = 'awx.main.views.handle_500'
urlpatterns = patterns('',
url(r'', include('awx.ui.urls', namespace='ui', app_name='ui')),
url(r'^api/', include('awx.api.urls', namespace='api', app_name='api')),
)
url(r'', include('awx.ui.urls', namespace='ui', app_name='ui')),
url(r'^api/', include('awx.api.urls', namespace='api', app_name='api')))
urlpatterns += patterns('awx.main.views',
url(r'^403.html$', 'handle_403'),
url(r'^404.html$', 'handle_404'),
url(r'^500.html$', 'handle_500'),
)
url(r'^403.html$', 'handle_403'),
url(r'^404.html$', 'handle_404'),
url(r'^500.html$', 'handle_500'))

View File

@@ -14,9 +14,7 @@ https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
from awx import prepare_env
prepare_env()
import os
import logging
from django.conf import settings
from awx import __version__ as tower_version
logger = logging.getLogger('awx.main.models.jobs')
try: