From bf7bb17f8d01f65ab5bbbd0ddd2b4213630c9c08 Mon Sep 17 00:00:00 2001 From: Hardirc Date: Fri, 6 Mar 2015 21:54:41 -0500 Subject: [PATCH] Improve PEP8 globals.py --- gluon/globals.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gluon/globals.py b/gluon/globals.py index e73630e1..1a3ebb6e 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -211,7 +211,7 @@ class Request(Storage): env = self.env post_vars = self._post_vars = Storage() body = self.body - #if content-type is application/json, we must read the body + # if content-type is application/json, we must read the body is_json = env.get('content_type', '')[:16] == 'application/json' if is_json: @@ -438,7 +438,7 @@ class Response(Storage): def include_meta(self): s = "\n"; for meta in (self.meta or {}).iteritems(): - k,v = meta + k, v = meta if isinstance(v,dict): s = s+'\n' else: @@ -491,10 +491,10 @@ class Response(Storage): for item in files: if isinstance(item, str): f = item.lower().split('?')[0] - # if static_version we need also to check for - # static_version_urls. In that case, the _.x.x.x - # bit would have already been added by the URL() - # function + # if static_version we need also to check for + # static_version_urls. In that case, the _.x.x.x + # bit would have already been added by the URL() + # function if self.static_version and not self.static_version_urls: item = item.replace( '/static/', '/static/_%s/' % self.static_version, 1) @@ -881,7 +881,7 @@ class Session(Storage): table_migrate = False tname = tablename + '_' + masterapp table = db.get(tname, None) - #Field = db.Field + # Field = db.Field if table is None: db.define_table( tname,