{"action":"opened","issue":{"url":"https://api.github.com/repos/TwilioDevEd/account-verification-flask/issues/8","labels_url":"https://api.github.com/repos/TwilioDevEd/account-verification-flask/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/TwilioDevEd/account-verification-flask/issues/8/comments","events_url":"https://api.github.com/repos/TwilioDevEd/account-verification-flask/issues/8/events","html_url":"https://github.com/TwilioDevEd/account-verification-flask/issues/8","id":118482359,"number":8,"title":"Clean up comments, semicolons, trailing whitespace and read up on PEP8","user":{"login":"atbaker","id":826669,"avatar_url":"https://avatars.githubusercontent.com/u/826669?v=3","gravatar_id":"","url":"https://api.github.com/users/atbaker","html_url":"https://github.com/atbaker","followers_url":"https://api.github.com/users/atbaker/followers","following_url":"https://api.github.com/users/atbaker/following{/other_user}","gists_url":"https://api.github.com/users/atbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/atbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atbaker/subscriptions","organizations_url":"https://api.github.com/users/atbaker/orgs","repos_url":"https://api.github.com/users/atbaker/repos","events_url":"https://api.github.com/users/atbaker/events{/privacy}","received_events_url":"https://api.github.com/users/atbaker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-23T22:00:22Z","updated_at":"2015-11-23T22:00:22Z","closed_at":null,"body":"We should clean up this app's code a little before we show it to other developers. A few things I spotted:\r\n\r\n- Commented out code ([like this](https://github.com/TwilioDevEd/account-verification-flask/blob/master/manage.py#L20)\r\n- Unnecessary semicolons ([like here](https://github.com/TwilioDevEd/account-verification-flask/blob/master/account_verification_flask/models/models.py#L22)). Python rarely needs them\r\n- Trailing whitespace ([here](https://github.com/TwilioDevEd/account-verification-flask/blob/master/account_verification_flask/views.py#L115))\r\n\r\nI would also recommend installing a Python linter in your text editor or reading up on [PEP8](https://www.python.org/dev/peps/pep-0008/), the Python style guide. Python has strict conventions for how code should be formatted.\r\n\r\nFor example, [this line](https://github.com/TwilioDevEd/account-verification-flask/blob/master/account_verification_flask/views.py#L26):\r\n\r\n```\r\nif User.query.filter(User.email == form.email.data).count()>0 :\r\n```\r\n\r\nShould instead read like this:\r\n\r\n```\r\nif User.query.filter(User.email == form.email.data).count() > 0:\r\n```\r\n\r\n([here's the relevant section of PEP8](https://www.python.org/dev/peps/pep-0008/#other-recommendations))\r\n"}}