summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYanis Guenane <yanis@guenane.org>2020-02-26 11:07:41 +0100
committerYanis Guenane <yanis@guenane.org>2020-02-26 11:07:46 +0100
commit07232f36944ad748d62a97b3806c662a6c79182c (patch)
tree9ed248fee85aabce81a9704aea9f20de92befc1d
parentMerge pull request #6046 from rooftopcellist/update_translations_awx (diff)
downloadawx-07232f36944ad748d62a97b3806c662a6c79182c.tar.xz
awx-07232f36944ad748d62a97b3806c662a6c79182c.zip
awx-api-lint: Fix setup.cfg syntax for linter test
Signed-off-by: Yanis Guenane <yguenane@redhat.com>
-rw-r--r--awxkit/awxkit/api/pages/credentials.py6
-rwxr-xr-xawxkit/awxkit/scripts/basic_session.py5
-rwxr-xr-xsetup.cfg4
-rwxr-xr-xtools/scripts/firehose.py5
4 files changed, 11 insertions, 9 deletions
diff --git a/awxkit/awxkit/api/pages/credentials.py b/awxkit/awxkit/api/pages/credentials.py
index b12ada76d0..d9d039c837 100644
--- a/awxkit/awxkit/api/pages/credentials.py
+++ b/awxkit/awxkit/api/pages/credentials.py
@@ -182,7 +182,8 @@ class CredentialType(HasCreate, base.Base):
response = self.connection.post(urljoin(str(self.url), 'test/'), data)
exception = exception_from_status_code(response.status_code)
exc_str = "%s (%s) received" % (
- http.responses[response.status_code], response.status_code)
+ http.responses[response.status_code], response.status_code
+ )
if exception:
raise exception(exc_str, response.json())
elif response.status_code == http.FORBIDDEN:
@@ -328,7 +329,8 @@ class Credential(HasCopy, HasCreate, base.Base):
response = self.connection.post(urljoin(str(self.url), 'test/'), data)
exception = exception_from_status_code(response.status_code)
exc_str = "%s (%s) received" % (
- http.responses[response.status_code], response.status_code)
+ http.responses[response.status_code], response.status_code
+ )
if exception:
raise exception(exc_str, response.json())
elif response.status_code == http.FORBIDDEN:
diff --git a/awxkit/awxkit/scripts/basic_session.py b/awxkit/awxkit/scripts/basic_session.py
index b5561c6d14..4ede325214 100755
--- a/awxkit/awxkit/scripts/basic_session.py
+++ b/awxkit/awxkit/scripts/basic_session.py
@@ -1,5 +1,4 @@
from argparse import ArgumentParser
-import traceback
import logging
import pdb # noqa
import sys
@@ -92,8 +91,8 @@ def main():
exc = e
raise
except Exception as e:
- exc = e
- rc = 1
+ exc = e # noqa
+ rc = 1 # noqa
raise
diff --git a/setup.cfg b/setup.cfg
index 3ab411f7ae..9dc6f6636d 100755
--- a/setup.cfg
+++ b/setup.cfg
@@ -25,5 +25,5 @@ deps =
flake8
yamllint
commands =
- - flake8
- - yamllint -s .
+ flake8
+ yamllint -s .
diff --git a/tools/scripts/firehose.py b/tools/scripts/firehose.py
index 761d69c88d..3d3a458b77 100755
--- a/tools/scripts/firehose.py
+++ b/tools/scripts/firehose.py
@@ -33,7 +33,6 @@ import subprocess
import sys
from io import StringIO
from time import time
-from random import randint
from uuid import uuid4
import psycopg2
@@ -200,7 +199,9 @@ def generate_events(events, job):
cursor.execute("SELECT indexname, indexdef FROM pg_indexes WHERE tablename='main_jobevent' AND indexname != 'main_jobevent_pkey';")
indexes = cursor.fetchall()
- cursor.execute("SELECT conname, contype, pg_catalog.pg_get_constraintdef(r.oid, true) as condef FROM pg_catalog.pg_constraint r WHERE r.conrelid = 'main_jobevent'::regclass AND conname != 'main_jobevent_pkey';")
+ cursor.execute(
+ "SELECT conname, contype, pg_catalog.pg_get_constraintdef(r.oid, true) as condef FROM pg_catalog.pg_constraint r WHERE r.conrelid = 'main_jobevent'::regclass AND conname != 'main_jobevent_pkey';" # noqa
+ )
constraints = cursor.fetchall()
# drop all indexes for speed