From 927d5e89695a34453114a4cf02814b9afdd917fd Mon Sep 17 00:00:00 2001 From: Matt Jia Date: Apr 06 2017 04:36:31 +0000 Subject: clean up the code to make flake8 happy --- diff --git a/docs/conf.py b/docs/conf.py index caf66ba..15c5ef7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -164,7 +164,6 @@ texinfo_documents = [ ] - # -- Options for Epub output ---------------------------------------------- # Bibliographic Dublin Core info. @@ -186,6 +185,5 @@ epub_copyright = copyright epub_exclude_files = ['search.html'] - # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'https://docs.python.org/': None} diff --git a/fedmsg.d/config.py b/fedmsg.d/config.py index f25c0ba..1d65f9f 100644 --- a/fedmsg.d/config.py +++ b/fedmsg.d/config.py @@ -13,7 +13,6 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -import os import socket hostname = socket.gethostname() diff --git a/tests/test_auth.py b/tests/test_auth.py index ea40a0a..7f534af 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -45,7 +45,7 @@ class TestKerberosAuthentication(object): 'waived': True, 'comment': 'it broke', } - r = client.post('/api/v1.0/waivers/', data=json.dumps(data), + r = client.post('/api/v1.0/waivers/', data=json.dumps(data), content_type='application/json', headers={'Authorization': 'Negotiate CTOKEN'}) assert r.status_code == 201 diff --git a/tox.ini b/tox.ini index d57b02a..53f7c0b 100644 --- a/tox.ini +++ b/tox.ini @@ -33,4 +33,7 @@ commands = [flake8] show-source = True max-line-length = 100 -exclude = .git,.tox,dist,*egg +exclude = .git,.tox,dist,*egg,env_waiverdb, *fedmsg.d + +# E124: closing bracket does not match visual indentation +ignore = E124 diff --git a/waiverdb/models/waivers.py b/waiverdb/models/waivers.py index 1fde440..d554f82 100644 --- a/waiverdb/models/waivers.py +++ b/waiverdb/models/waivers.py @@ -30,6 +30,6 @@ class Waiver(db.Model): self.comment = comment def __repr__(self): - return '%s(result_id=%r, username=%r, product_version=%r, waived=%r)' % ( - self.__class__.__name__, self.result_id, self.username, - self.product_version, self.waived) + return '%s(result_id=%r, username=%r, product_version=%r, waived=%r)' % \ + (self.__class__.__name__, self.result_id, self.username, self.product_version, + self.waived)