Skip to content

Commit

Permalink
make flake8 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismeyersfsu committed Feb 18, 2015
1 parent 81205d3 commit 4f907c6
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 20 deletions.
1 change: 0 additions & 1 deletion awx/main/management/commands/run_callback_receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion awx/main/management/commands/run_socketio_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion awx/main/management/commands/run_task_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion awx/main/models/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import hmac
import json
import logging
import re

# Django
from django.conf import settings
Expand Down
12 changes: 8 additions & 4 deletions awx/main/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions awx/main/tests/jobs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from jobs_monolithic import *
from survey_password import *
from base import *
from awx.main.tests.jobs.jobs_monolithic import * # noqa
from survey_password import * # noqa
from base import * # noqa
11 changes: 5 additions & 6 deletions awx/main/tests/jobs/survey_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import json

# Django
import django.test
from django.core.urlresolvers import reverse

# AWX
Expand Down Expand Up @@ -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
})
Expand Down
1 change: 0 additions & 1 deletion awx/main/tests/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion awx/main/tests/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
self._test_redaction_enabled('txt')
2 changes: 1 addition & 1 deletion setup.cfg
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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/

0 comments on commit 4f907c6

Please sign in to comment.