summaryrefslogtreecommitdiff
path: root/pecan
diff options
context:
space:
mode:
authorRyan Petrello <lists@ryanpetrello.com>2014-03-27 15:40:14 -0400
committerRyan Petrello <lists@ryanpetrello.com>2014-03-27 15:40:14 -0400
commit8e9d8b7bb77f4c2ad32f37f0dfc4360575a4c6a5 (patch)
tree889d85efc260a7f9dc30851c1681f2b478c4443e /pecan
parentb6fbdd05735ed860ed8cca35ea28cd524f6bdeff (diff)
downloadpecan-8e9d8b7bb77f4c2ad32f37f0dfc4360575a4c6a5.tar.gz
pep8 fixes
Change-Id: If592949bb1dedfc3674d939d5244f5efd4a02eb3
Diffstat (limited to 'pecan')
-rw-r--r--pecan/jsonify.py6
-rw-r--r--pecan/middleware/recursive.py2
-rw-r--r--pecan/tests/test_base.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/pecan/jsonify.py b/pecan/jsonify.py
index 726213a..8eb310e 100644
--- a/pecan/jsonify.py
+++ b/pecan/jsonify.py
@@ -89,9 +89,9 @@ class GenericJSON(JSONEncoder):
elif isinstance(obj, (date, datetime)):
return str(obj)
elif isinstance(obj, Decimal):
- # XXX What to do about JSONEncoder crappy handling of Decimals?
- # SimpleJSON has better Decimal encoding than the std lib
- # but only in recent versions
+ # XXX What to do about JSONEncoder crappy handling of Decimals?
+ # SimpleJSON has better Decimal encoding than the std lib
+ # but only in recent versions
return float(obj)
elif is_saobject(obj):
props = {}
diff --git a/pecan/middleware/recursive.py b/pecan/middleware/recursive.py
index b1296b8..fb9d19c 100644
--- a/pecan/middleware/recursive.py
+++ b/pecan/middleware/recursive.py
@@ -142,7 +142,7 @@ class ForwardRequestException(Exception):
self.path_info = path_info
# If the url can be treated as a path_info do that
- if url and not '?' in str(url):
+ if url and '?' not in str(url):
self.path_info = url
# Base middleware
diff --git a/pecan/tests/test_base.py b/pecan/tests/test_base.py
index 5319013..1ae1e79 100644
--- a/pecan/tests/test_base.py
+++ b/pecan/tests/test_base.py
@@ -867,9 +867,9 @@ class TestRedirect(PecanTestCase):
res = app.get(
'/child', extra_environ=dict(HTTP_X_FORWARDED_PROTO='https')
)
- ##non-canonical url will redirect, so we won't get a 301
+ # non-canonical url will redirect, so we won't get a 301
assert res.status_int == 302
- ##should add trailing / and changes location to https
+ # should add trailing / and changes location to https
assert res.location == 'https://localhost/child/'
assert res.request.environ['HTTP_X_FORWARDED_PROTO'] == 'https'