diff --git a/awx/main/management/commands/run_callback_receiver.py b/awx/main/management/commands/run_callback_receiver.py index e883a1963c46..3ce68147b355 100644 --- a/awx/main/management/commands/run_callback_receiver.py +++ b/awx/main/management/commands/run_callback_receiver.py @@ -15,7 +15,6 @@ from django.core.management.base import NoArgsCommand from django.db import transaction, DatabaseError from django.utils.dateparse import parse_datetime -from django.utils.timezone import now from django.utils.tzinfo import FixedOffset from django.db import connection diff --git a/awx/main/management/commands/run_socketio_service.py b/awx/main/management/commands/run_socketio_service.py index 2a47818893fe..787e18120224 100644 --- a/awx/main/management/commands/run_socketio_service.py +++ b/awx/main/management/commands/run_socketio_service.py @@ -11,7 +11,6 @@ # Django from django.conf import settings from django.core.management.base import NoArgsCommand -from django.utils.timezone import now # AWX import awx diff --git a/awx/main/management/commands/run_task_system.py b/awx/main/management/commands/run_task_system.py index 31acbb6af432..d7918e58f560 100644 --- a/awx/main/management/commands/run_task_system.py +++ b/awx/main/management/commands/run_task_system.py @@ -11,7 +11,6 @@ # Django from django.conf import settings from django.core.management.base import NoArgsCommand -from django.utils.timezone import now # AWX from awx.main.models import * # noqa diff --git a/awx/main/models/jobs.py b/awx/main/models/jobs.py index 3e4a474c3d80..dbdb8d5e517a 100644 --- a/awx/main/models/jobs.py +++ b/awx/main/models/jobs.py @@ -5,7 +5,6 @@ import hmac import json import logging -import re # Django from django.conf import settings diff --git a/awx/main/tests/base.py b/awx/main/tests/base.py index 4da109718cf8..7261374c281c 100644 --- a/awx/main/tests/base.py +++ b/awx/main/tests/base.py @@ -323,8 +323,8 @@ def make_job(self, job_template=None, created_by=None, inital_state='new', **kwa job_template = self.make_job_template(created_by=created_by) opts = { - 'created_by': created_by, - 'status': inital_state, + 'created_by': created_by, + 'status': inital_state, } opts.update(kwargs) return job_template.create_job(**opts) @@ -448,9 +448,13 @@ def _generic_rest(self, url, data=None, expect=204, auth=None, method=None, elif response['Content-Type'].startswith('application/yaml'): obj = yaml.safe_load(response.content) elif response['Content-Type'].startswith('text/plain'): - obj = { 'content': response.content } + obj = { + 'content': response.content + } elif response['Content-Type'].startswith('text/html'): - obj = { 'content': response.content } + obj = { + 'content': response.content + } else: self.fail('Unsupport response content type %s' % response['Content-Type']) else: diff --git a/awx/main/tests/jobs/__init__.py b/awx/main/tests/jobs/__init__.py index 73064040b6cb..7cba7993438e 100644 --- a/awx/main/tests/jobs/__init__.py +++ b/awx/main/tests/jobs/__init__.py @@ -1,3 +1,3 @@ -from jobs_monolithic import * -from survey_password import * -from base import * \ No newline at end of file +from awx.main.tests.jobs.jobs_monolithic import * # noqa +from survey_password import * # noqa +from base import * # noqa diff --git a/awx/main/tests/jobs/survey_password.py b/awx/main/tests/jobs/survey_password.py index 4d652675f25b..60354da77888 100644 --- a/awx/main/tests/jobs/survey_password.py +++ b/awx/main/tests/jobs/survey_password.py @@ -2,7 +2,6 @@ import json # Django -import django.test from django.core.urlresolvers import reverse # AWX @@ -91,32 +90,32 @@ { 'description': 'Single instance with a . after', 'text' : 'See spot. See spot run. See spot run %s. That is a fast run.' % PASSWORD, - 'passwords': [ PASSWORD ], + 'passwords': [PASSWORD], 'occurances': 1, }, { 'description': 'Single instance with , after', 'text': 'Spot goes %s, at a fast pace' % PASSWORD, - 'passwords': [ PASSWORD ], + 'passwords': [PASSWORD], 'occurances': 1, }, { 'description': 'Single instance with a space after', 'text': 'Is %s very fast?' % PASSWORD, - 'passwords': [ PASSWORD ], + 'passwords': [PASSWORD], 'occurances': 1, }, { 'description': 'Many instances, also with newline', 'text': 'I think %s is very very fast. If I ran %s for 4 hours how many hours would I run?.\nTrick question. %s for 4 hours would result in running for 4 hours' % (PASSWORD, PASSWORD, PASSWORD), - 'passwords': [ PASSWORD ], + 'passwords': [PASSWORD], 'occurances': 3, }, ] passwd = 'my!@#$%^pass&*()_+' TEST_SINGLE_PASSWORDS.append({ 'description': 'password includes characters not in a-z 0-9 range', - 'passwords': [ passwd ], + 'passwords': [passwd], 'text': 'Text is fun yeah with passwords %s.' % passwd, 'occurances': 1 }) diff --git a/awx/main/tests/tasks.py b/awx/main/tests/tasks.py index c0785597ba6d..d069f4174463 100644 --- a/awx/main/tests/tasks.py +++ b/awx/main/tests/tasks.py @@ -13,7 +13,6 @@ # Django from django.conf import settings -from django.test.utils import override_settings from django.utils.timezone import now # Django-CRUM diff --git a/awx/main/tests/views.py b/awx/main/tests/views.py index 34924b1da8c1..629b1e1fbc60 100644 --- a/awx/main/tests/views.py +++ b/awx/main/tests/views.py @@ -75,4 +75,4 @@ def test_redaction_enabled_html(self): self._test_redaction_enabled('html') def test_redaction_enabled_txt(self): - self._test_redaction_enabled('txt') \ No newline at end of file + self._test_redaction_enabled('txt') diff --git a/setup.cfg b/setup.cfg old mode 100644 new mode 100755 index b8dfcba65721..bd64ca194399 --- a/setup.cfg +++ b/setup.cfg @@ -18,4 +18,4 @@ exclude=awx/lib/site-packages,awx/ui,awx/api/urls.py,awx/main/migrations,awx/mai [flake8] ignore=E201,E203,E221,E225,E231,E241,E251,E261,E265,E302,E303,E501,W291,W391,W293,E731 -exclude=awx/lib/site-packages,awx/ui,awx/api/urls.py,awx/main/migrations,awx/main/tests/data +exclude=awx/lib/site-packages,awx/ui,awx/api/urls.py,awx/main/migrations,awx/main/tests/data,node_modules/,awx/projects/