Permalink
Browse files

Pep-8.

  • Loading branch information...
1 parent 5631ff4 commit 1d01ca2fc74cc326b54a6bc10793ecbfb84a4b91 @shabda shabda committed Nov 8, 2010
Showing with 12 additions and 12 deletions.
  1. +2 −2 bottle/app.py
  2. +2 −3 flask/app.py
  3. +4 −3 itty/app.py
  4. +1 −1 juno/app.py
  5. +1 −1 tornado/app.py
  6. +1 −1 webob/app.py
  7. +1 −1 webpy/main.py
View
@@ -12,12 +12,12 @@
@route('/')
def index():
fml_endpoint = 'http://graph.facebook.com/search?q="so%20starving&type=post'
- fb_data = cache.get(key = fml_endpoint)
+ fb_data = cache.get(key=fml_endpoint)
if not fb_data:
fb_response = urllib.urlopen(fml_endpoint,).read()
fb_data = simplejson.loads(fb_response)["data"]
cache.set(fml_endpoint, fb_data, 30 * 60)
- return template('templates/index', data = fb_data)
+ return template('templates/index', data=fb_data)
application = bottle.default_app()
View
@@ -10,15 +10,14 @@
app = Flask(__name__)
@app.route('/')
-
def index():
fml_endpoint = 'http://graph.facebook.com/search?q="so%20starving&type=post'
- fb_data = cache.get(key = fml_endpoint)
+ fb_data = cache.get(key=fml_endpoint)
if not fb_data:
fb_response = urllib.urlopen(fml_endpoint,).read()
fb_data = simplejson.loads(fb_response)["data"]
cache.set(fml_endpoint, fb_data, 30 * 60)
- return render_template("index.html", data = fb_data)
+ return render_template("index.html", data=fb_data)
application = app
View
@@ -11,13 +11,14 @@
@get('/')
def index(request):
fml_endpoint = 'http://graph.facebook.com/search?q="so%20starving&type=post'
- fb_data = cache.get(key = fml_endpoint)
+ fb_data = cache.get(key=fml_endpoint)
if not fb_data:
fb_response = urllib.urlopen(fml_endpoint,).read()
fb_data = simplejson.loads(fb_response)["data"]
cache.set(fml_endpoint, fb_data, 30 * 60)
env = Environment(loader=FileSystemLoader('templates'))
template = env.get_template("index.html")
- return template.render(data = fb_data)
+ return template.render(data=fb_data)
-run_itty()
+if __name__ == "__main__":
+ run_itty()
View
@@ -9,7 +9,7 @@
@route('/')
def index(web):
fml_endpoint = 'http://graph.facebook.com/search?q="so%20starving&type=post'
- fb_data = cache.get(key = fml_endpoint)
+ fb_data = cache.get(key=fml_endpoint)
if not fb_data:
fb_response = urllib.urlopen(fml_endpoint,).read()
fb_data = simplejson.loads(fb_response)["data"]
View
@@ -13,7 +13,7 @@ def prepare(self):
@tornado.web.asynchronous
def get(self):
- fb_data = cache.get(key = self.fml_endpoint)
+ fb_data = cache.get(key=self.fml_endpoint)
if not fb_data:
tornado.httpclient.AsyncHTTPClient().fetch(self.fml_endpoint, callback=self.on_response)
View
@@ -19,7 +19,7 @@ def index(request):
# Render the content
env = Environment(loader=FileSystemLoader('templates'))
template = env.get_template("index.html")
- body = template.render(data = fb_data)
+ body = template.render(data=fb_data)
# Set the body and the cache expiration
response = Response(body=body)
View
@@ -13,7 +13,7 @@
class index:
def GET(self):
fml_endpoint = 'http://graph.facebook.com/search?q="so%20starving&type=post'
- fb_data = cache.get(key = fml_endpoint)
+ fb_data = cache.get(key=fml_endpoint)
if not fb_data:
fb_response = urllib.urlopen(fml_endpoint,).read()
fb_data = simplejson.loads(fb_response)["data"]

0 comments on commit 1d01ca2

Please sign in to comment.