{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/173634665","pull_request_review_id":102862817,"id":173634665,"diff_hunk":"@@ -714,11 +718,142 @@ def _check_spacing(all_files):\n     return summary_messages\n \n \n+def _check_comments(all_files):\n+    \"\"\"This functions checks for a period at the end of comment.\"\"\"\n+    print 'Starting comment checks'\n+    print '----------------------------------------'\n+    summary_messages = []\n+    files_to_check = [\n+        filename for filename in all_files if not\n+        any(fnmatch.fnmatch(filename, pattern) for pattern in EXCLUDED_PATHS)\n+        and filename.endswith('.py')]\n+    message = 'There should be a period at the end of the comment.'\n+    failed = False\n+    for filename in files_to_check:\n+        f = open(filename, 'r')\n+        content = f.readlines()\n+        length = len(content)\n+        line_num = 0\n+        while line_num < length:\n+            line = content[line_num].lstrip().rstrip()\n+            if line.startswith('#'):\n+                if line_num + 1 == length:\n+                    if line[-1] not in PUNCTUATIONS and line[1:].lstrip()[0].isupper():","path":"scripts/pre_commit_linter.py","position":null,"original_position":35,"commit_id":"a203cdd487ddf95121fce62a30e455c2fce9cdac","original_commit_id":"5b80751ede3b999eb1171c03afed17c465a03ffd","user":{"login":"kevinlee12","id":5758256,"avatar_url":"https://avatars0.githubusercontent.com/u/5758256?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinlee12","html_url":"https://github.com/kevinlee12","followers_url":"https://api.github.com/users/kevinlee12/followers","following_url":"https://api.github.com/users/kevinlee12/following{/other_user}","gists_url":"https://api.github.com/users/kevinlee12/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinlee12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinlee12/subscriptions","organizations_url":"https://api.github.com/users/kevinlee12/orgs","repos_url":"https://api.github.com/users/kevinlee12/repos","events_url":"https://api.github.com/users/kevinlee12/events{/privacy}","received_events_url":"https://api.github.com/users/kevinlee12/received_events","type":"User","site_admin":false},"body":"In that case, let's keep question marks. So the only allowable punctuations are periods and question marks. ","created_at":"2018-03-10T20:58:14Z","updated_at":"2018-03-10T20:58:14Z","html_url":"https://github.com/oppia/oppia/pull/4759#discussion_r173634665","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/4759","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/173634665"},"html":{"href":"https://github.com/oppia/oppia/pull/4759#discussion_r173634665"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/4759"}},"in_reply_to_id":173614089},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/4759","id":172327727,"html_url":"https://github.com/oppia/oppia/pull/4759","diff_url":"https://github.com/oppia/oppia/pull/4759.diff","patch_url":"https://github.com/oppia/oppia/pull/4759.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/4759","number":4759,"state":"open","locked":false,"title":"Fix part of #3905: Add check for period at comment and docstring end","user":{"login":"bansalnitish","id":22434689,"avatar_url":"https://avatars1.githubusercontent.com/u/22434689?v=4","gravatar_id":"","url":"https://api.github.com/users/bansalnitish","html_url":"https://github.com/bansalnitish","followers_url":"https://api.github.com/users/bansalnitish/followers","following_url":"https://api.github.com/users/bansalnitish/following{/other_user}","gists_url":"https://api.github.com/users/bansalnitish/gists{/gist_id}","starred_url":"https://api.github.com/users/bansalnitish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bansalnitish/subscriptions","organizations_url":"https://api.github.com/users/bansalnitish/orgs","repos_url":"https://api.github.com/users/bansalnitish/repos","events_url":"https://api.github.com/users/bansalnitish/events{/privacy}","received_events_url":"https://api.github.com/users/bansalnitish/received_events","type":"User","site_admin":false},"body":"\r\n## Explanation\r\nFixes part of #3905: This PR adds a function to check for period at end of comments and docstrings.\r\n\r\n## Checklist\r\n- [ ] The PR title starts with \"Fix #bugnum: \", followed by a short, clear summary of the changes.\r\n- [ ] The PR explanation includes the words \"Fixes #bugnum: ...\".\r\n- [x] The linter/Karma presubmit checks have passed.\r\n  - These should run automatically, but if not, you can manually trigger them locally using `python scripts/pre_commit_linter.py` and `bash scripts/run_frontend_tests.sh`.\r\n- [x] The PR is made from a branch that's **not** called \"develop\".\r\n- [x] The PR follows the [style guide](https://github.com/oppia/oppia/wiki/Coding-style-guide).\r\n- [x] The PR is assigned to an appropriate reviewer.\r\n  - If you're a new contributor, please ask on [Gitter](https://gitter.im/oppia/oppia-chat) for someone to assign a reviewer.\r\n  - If you're not sure who the appropriate reviewer is, please assign to the issue's \"owner\" -- see the \"talk-to\" label on the issue.\r\n","created_at":"2018-03-01T19:16:11Z","updated_at":"2018-03-10T20:58:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a43158a49feb83888ec584e143cb3ec9435e2ea","assignee":{"login":"bansalnitish","id":22434689,"avatar_url":"https://avatars1.githubusercontent.com/u/22434689?v=4","gravatar_id":"","url":"https://api.github.com/users/bansalnitish","html_url":"https://github.com/bansalnitish","followers_url":"https://api.github.com/users/bansalnitish/followers","following_url":"https://api.github.com/users/bansalnitish/following{/other_user}","gists_url":"https://api.github.com/users/bansalnitish/gists{/gist_id}","starred_url":"https://api.github.com/users/bansalnitish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bansalnitish/subscriptions","organizations_url":"https://api.github.com/users/bansalnitish/orgs","repos_url":"https://api.github.com/users/bansalnitish/repos","events_url":"https://api.github.com/users/bansalnitish/events{/privacy}","received_events_url":"https://api.github.com/users/bansalnitish/received_events","type":"User","site_admin":false},"assignees":[{"login":"bansalnitish","id":22434689,"avatar_url":"https://avatars1.githubusercontent.com/u/22434689?v=4","gravatar_id":"","url":"https://api.github.com/users/bansalnitish","html_url":"https://github.com/bansalnitish","followers_url":"https://api.github.com/users/bansalnitish/followers","following_url":"https://api.github.com/users/bansalnitish/following{/other_user}","gists_url":"https://api.github.com/users/bansalnitish/gists{/gist_id}","starred_url":"https://api.github.com/users/bansalnitish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bansalnitish/subscriptions","organizations_url":"https://api.github.com/users/bansalnitish/orgs","repos_url":"https://api.github.com/users/bansalnitish/repos","events_url":"https://api.github.com/users/bansalnitish/events{/privacy}","received_events_url":"https://api.github.com/users/bansalnitish/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/4759/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/4759/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/4759/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/a203cdd487ddf95121fce62a30e455c2fce9cdac","head":{"label":"bansalnitish:lint-fix","ref":"lint-fix","sha":"a203cdd487ddf95121fce62a30e455c2fce9cdac","user":{"login":"bansalnitish","id":22434689,"avatar_url":"https://avatars1.githubusercontent.com/u/22434689?v=4","gravatar_id":"","url":"https://api.github.com/users/bansalnitish","html_url":"https://github.com/bansalnitish","followers_url":"https://api.github.com/users/bansalnitish/followers","following_url":"https://api.github.com/users/bansalnitish/following{/other_user}","gists_url":"https://api.github.com/users/bansalnitish/gists{/gist_id}","starred_url":"https://api.github.com/users/bansalnitish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bansalnitish/subscriptions","organizations_url":"https://api.github.com/users/bansalnitish/orgs","repos_url":"https://api.github.com/users/bansalnitish/repos","events_url":"https://api.github.com/users/bansalnitish/events{/privacy}","received_events_url":"https://api.github.com/users/bansalnitish/received_events","type":"User","site_admin":false},"repo":{"id":118839208,"name":"oppia","full_name":"bansalnitish/oppia","owner":{"login":"bansalnitish","id":22434689,"avatar_url":"https://avatars1.githubusercontent.com/u/22434689?v=4","gravatar_id":"","url":"https://api.github.com/users/bansalnitish","html_url":"https://github.com/bansalnitish","followers_url":"https://api.github.com/users/bansalnitish/followers","following_url":"https://api.github.com/users/bansalnitish/following{/other_user}","gists_url":"https://api.github.com/users/bansalnitish/gists{/gist_id}","starred_url":"https://api.github.com/users/bansalnitish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bansalnitish/subscriptions","organizations_url":"https://api.github.com/users/bansalnitish/orgs","repos_url":"https://api.github.com/users/bansalnitish/repos","events_url":"https://api.github.com/users/bansalnitish/events{/privacy}","received_events_url":"https://api.github.com/users/bansalnitish/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bansalnitish/oppia","description":"Tool for collaboratively building interactive lessons.","fork":true,"url":"https://api.github.com/repos/bansalnitish/oppia","forks_url":"https://api.github.com/repos/bansalnitish/oppia/forks","keys_url":"https://api.github.com/repos/bansalnitish/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bansalnitish/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bansalnitish/oppia/teams","hooks_url":"https://api.github.com/repos/bansalnitish/oppia/hooks","issue_events_url":"https://api.github.com/repos/bansalnitish/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/bansalnitish/oppia/events","assignees_url":"https://api.github.com/repos/bansalnitish/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/bansalnitish/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/bansalnitish/oppia/tags","blobs_url":"https://api.github.com/repos/bansalnitish/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bansalnitish/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bansalnitish/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/bansalnitish/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bansalnitish/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/bansalnitish/oppia/languages","stargazers_url":"https://api.github.com/repos/bansalnitish/oppia/stargazers","contributors_url":"https://api.github.com/repos/bansalnitish/oppia/contributors","subscribers_url":"https://api.github.com/repos/bansalnitish/oppia/subscribers","subscription_url":"https://api.github.com/repos/bansalnitish/oppia/subscription","commits_url":"https://api.github.com/repos/bansalnitish/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/bansalnitish/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/bansalnitish/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/bansalnitish/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/bansalnitish/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/bansalnitish/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bansalnitish/oppia/merges","archive_url":"https://api.github.com/repos/bansalnitish/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bansalnitish/oppia/downloads","issues_url":"https://api.github.com/repos/bansalnitish/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/bansalnitish/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/bansalnitish/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/bansalnitish/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bansalnitish/oppia/labels{/name}","releases_url":"https://api.github.com/repos/bansalnitish/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/bansalnitish/oppia/deployments","created_at":"2018-01-25T00:19:07Z","updated_at":"2018-01-25T00:19:13Z","pushed_at":"2018-03-10T20:55:17Z","git_url":"git://github.com/bansalnitish/oppia.git","ssh_url":"git@github.com:bansalnitish/oppia.git","clone_url":"https://github.com/bansalnitish/oppia.git","svn_url":"https://github.com/bansalnitish/oppia","homepage":"https://www.oppia.org","size":101304,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"oppia:develop","ref":"develop","sha":"7ea6e64dec1187e6d4ebb1bf5d305a0ed446ed1a","user":{"login":"oppia","id":11620230,"avatar_url":"https://avatars1.githubusercontent.com/u/11620230?v=4","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"repo":{"id":40687563,"name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"avatar_url":"https://avatars1.githubusercontent.com/u/11620230?v=4","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oppia/oppia","description":"Tool for collaboratively building interactive lessons.","fork":false,"url":"https://api.github.com/repos/oppia/oppia","forks_url":"https://api.github.com/repos/oppia/oppia/forks","keys_url":"https://api.github.com/repos/oppia/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppia/teams","hooks_url":"https://api.github.com/repos/oppia/oppia/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppia/events","assignees_url":"https://api.github.com/repos/oppia/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppia/tags","blobs_url":"https://api.github.com/repos/oppia/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppia/languages","stargazers_url":"https://api.github.com/repos/oppia/oppia/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppia/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppia/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppia/subscription","commits_url":"https://api.github.com/repos/oppia/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppia/merges","archive_url":"https://api.github.com/repos/oppia/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppia/downloads","issues_url":"https://api.github.com/repos/oppia/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/oppia/oppia/deployments","created_at":"2015-08-14T00:16:14Z","updated_at":"2018-03-10T19:25:07Z","pushed_at":"2018-03-10T20:55:19Z","git_url":"git://github.com/oppia/oppia.git","ssh_url":"git@github.com:oppia/oppia.git","clone_url":"https://github.com/oppia/oppia.git","svn_url":"https://github.com/oppia/oppia","homepage":"https://www.oppia.org","size":101215,"stargazers_count":598,"watchers_count":598,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":594,"mirror_url":null,"archived":false,"open_issues_count":307,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":594,"open_issues":307,"watchers":598,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/4759"},"html":{"href":"https://github.com/oppia/oppia/pull/4759"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/4759"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/4759/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/4759/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/4759/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/a203cdd487ddf95121fce62a30e455c2fce9cdac"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kevinlee12"}}