From c362c23189e62d99bea48e0e0231fd958f1c91e3 Mon Sep 17 00:00:00 2001 From: Fillipe Date: Mon, 28 Oct 2019 19:51:38 -0300 Subject: [PATCH] Removing unecessary parameters I have submited this to improve the code on a more fresh way to interpret python. --- app.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index 35631d7..ffb1351 100644 --- a/app.py +++ b/app.py @@ -63,10 +63,10 @@ def render(): for i in range(level): level_str = level_str + u'\u2B50' - if bio is None: - bio = "" - if interests is None: - interests = "" + + bio = "" if bio is None else "" + interests = "" if interests is None else "" + return render_template('profile.html', id=id, bio=bio, interests=interests, level=level_str) @@ -110,9 +110,9 @@ def webhook(): db.session.rollback() return '' - if game.isGame(event) == True: + if game.isGame(event): x = game.gamify(event['message']['text'], id=sender) - if x == True: + if x: continue if activechatsdb.isActive(sender): @@ -169,4 +169,4 @@ def webhook(): if __name__ == '__main__': app.run() - #, port=int(os.environ.get('PORT', 4431)) \ No newline at end of file + #, port=int(os.environ.get('PORT', 4431))