Skip to content

Commit

Permalink
Pep-8.
Browse files Browse the repository at this point in the history
  • Loading branch information
shabda committed Nov 8, 2010
1 parent 5631ff4 commit 1d01ca2
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions bottle/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
5 changes: 2 additions & 3 deletions flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions itty/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion juno/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion tornado/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion webob/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion webpy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 1d01ca2

Please sign in to comment.