{"action":"closed","number":135,"pull_request":{"url":"https://api.github.com/repos/lowerquality/gentle/pulls/135","id":118125528,"html_url":"https://github.com/lowerquality/gentle/pull/135","diff_url":"https://github.com/lowerquality/gentle/pull/135.diff","patch_url":"https://github.com/lowerquality/gentle/pull/135.patch","issue_url":"https://api.github.com/repos/lowerquality/gentle/issues/135","number":135,"state":"closed","locked":false,"title":"Minor code cleanup:  methods and constants instead of raw strings","user":{"login":"ronen","id":125620,"avatar_url":"https://avatars1.githubusercontent.com/u/125620?v=3","gravatar_id":"","url":"https://api.github.com/users/ronen","html_url":"https://github.com/ronen","followers_url":"https://api.github.com/users/ronen/followers","following_url":"https://api.github.com/users/ronen/following{/other_user}","gists_url":"https://api.github.com/users/ronen/gists{/gist_id}","starred_url":"https://api.github.com/users/ronen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronen/subscriptions","organizations_url":"https://api.github.com/users/ronen/orgs","repos_url":"https://api.github.com/users/ronen/repos","events_url":"https://api.github.com/users/ronen/events{/privacy}","received_events_url":"https://api.github.com/users/ronen/received_events","type":"User","site_admin":false},"body":"Rather than assigning and testing raw strings, define constants: \r\n\r\n```python\r\nWord.SUCCESS = 'success'\r\nWord.NOT_FOUND_IN_AUDIO = 'not-found-in-audio'\r\nWord.NOT_FOUND_IN_TRANSCRIPT = 'not-found-in-transcript'\r\n```\r\n\r\nand methods:\r\n\r\n```python\r\nword.success()\r\nword.not_found_in_audio()\r\n```\r\n\r\nThis to avoid potential mystery bugs by typos such as `if word.case == 'succes'` which would silently give the wrong behavior. With this PR any such typo will yield an `AttributeError`","created_at":"2017-04-28T10:38:36Z","updated_at":"2017-05-03T06:14:23Z","closed_at":"2017-05-03T06:14:23Z","merged_at":"2017-05-03T06:14:23Z","merge_commit_sha":"ac0bb5b417715655100908e05762c7ffa88f8bda","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lowerquality/gentle/pulls/135/commits","review_comments_url":"https://api.github.com/repos/lowerquality/gentle/pulls/135/comments","review_comment_url":"https://api.github.com/repos/lowerquality/gentle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lowerquality/gentle/issues/135/comments","statuses_url":"https://api.github.com/repos/lowerquality/gentle/statuses/c41d05d743d0c76154a391155f1770b1783909ab","head":{"label":"ronen:word-methods","ref":"word-methods","sha":"c41d05d743d0c76154a391155f1770b1783909ab","user":{"login":"ronen","id":125620,"avatar_url":"https://avatars1.githubusercontent.com/u/125620?v=3","gravatar_id":"","url":"https://api.github.com/users/ronen","html_url":"https://github.com/ronen","followers_url":"https://api.github.com/users/ronen/followers","following_url":"https://api.github.com/users/ronen/following{/other_user}","gists_url":"https://api.github.com/users/ronen/gists{/gist_id}","starred_url":"https://api.github.com/users/ronen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronen/subscriptions","organizations_url":"https://api.github.com/users/ronen/orgs","repos_url":"https://api.github.com/users/ronen/repos","events_url":"https://api.github.com/users/ronen/events{/privacy}","received_events_url":"https://api.github.com/users/ronen/received_events","type":"User","site_admin":false},"repo":{"id":53883523,"name":"gentle","full_name":"ronen/gentle","owner":{"login":"ronen","id":125620,"avatar_url":"https://avatars1.githubusercontent.com/u/125620?v=3","gravatar_id":"","url":"https://api.github.com/users/ronen","html_url":"https://github.com/ronen","followers_url":"https://api.github.com/users/ronen/followers","following_url":"https://api.github.com/users/ronen/following{/other_user}","gists_url":"https://api.github.com/users/ronen/gists{/gist_id}","starred_url":"https://api.github.com/users/ronen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronen/subscriptions","organizations_url":"https://api.github.com/users/ronen/orgs","repos_url":"https://api.github.com/users/ronen/repos","events_url":"https://api.github.com/users/ronen/events{/privacy}","received_events_url":"https://api.github.com/users/ronen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ronen/gentle","description":"gentle forced aligner","fork":true,"url":"https://api.github.com/repos/ronen/gentle","forks_url":"https://api.github.com/repos/ronen/gentle/forks","keys_url":"https://api.github.com/repos/ronen/gentle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ronen/gentle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ronen/gentle/teams","hooks_url":"https://api.github.com/repos/ronen/gentle/hooks","issue_events_url":"https://api.github.com/repos/ronen/gentle/issues/events{/number}","events_url":"https://api.github.com/repos/ronen/gentle/events","assignees_url":"https://api.github.com/repos/ronen/gentle/assignees{/user}","branches_url":"https://api.github.com/repos/ronen/gentle/branches{/branch}","tags_url":"https://api.github.com/repos/ronen/gentle/tags","blobs_url":"https://api.github.com/repos/ronen/gentle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ronen/gentle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ronen/gentle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ronen/gentle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ronen/gentle/statuses/{sha}","languages_url":"https://api.github.com/repos/ronen/gentle/languages","stargazers_url":"https://api.github.com/repos/ronen/gentle/stargazers","contributors_url":"https://api.github.com/repos/ronen/gentle/contributors","subscribers_url":"https://api.github.com/repos/ronen/gentle/subscribers","subscription_url":"https://api.github.com/repos/ronen/gentle/subscription","commits_url":"https://api.github.com/repos/ronen/gentle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ronen/gentle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ronen/gentle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ronen/gentle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ronen/gentle/contents/{+path}","compare_url":"https://api.github.com/repos/ronen/gentle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ronen/gentle/merges","archive_url":"https://api.github.com/repos/ronen/gentle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ronen/gentle/downloads","issues_url":"https://api.github.com/repos/ronen/gentle/issues{/number}","pulls_url":"https://api.github.com/repos/ronen/gentle/pulls{/number}","milestones_url":"https://api.github.com/repos/ronen/gentle/milestones{/number}","notifications_url":"https://api.github.com/repos/ronen/gentle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ronen/gentle/labels{/name}","releases_url":"https://api.github.com/repos/ronen/gentle/releases{/id}","deployments_url":"https://api.github.com/repos/ronen/gentle/deployments","created_at":"2016-03-14T18:58:38Z","updated_at":"2016-03-14T18:58:39Z","pushed_at":"2017-05-02T12:48:44Z","git_url":"git://github.com/ronen/gentle.git","ssh_url":"git@github.com:ronen/gentle.git","clone_url":"https://github.com/ronen/gentle.git","svn_url":"https://github.com/ronen/gentle","homepage":"https://lowerquality.com/gentle/","size":1649,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lowerquality:master","ref":"master","sha":"938288ae128c33c4a91dac7cf8d943182dd1f86e","user":{"login":"lowerquality","id":15257837,"avatar_url":"https://avatars0.githubusercontent.com/u/15257837?v=3","gravatar_id":"","url":"https://api.github.com/users/lowerquality","html_url":"https://github.com/lowerquality","followers_url":"https://api.github.com/users/lowerquality/followers","following_url":"https://api.github.com/users/lowerquality/following{/other_user}","gists_url":"https://api.github.com/users/lowerquality/gists{/gist_id}","starred_url":"https://api.github.com/users/lowerquality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowerquality/subscriptions","organizations_url":"https://api.github.com/users/lowerquality/orgs","repos_url":"https://api.github.com/users/lowerquality/repos","events_url":"https://api.github.com/users/lowerquality/events{/privacy}","received_events_url":"https://api.github.com/users/lowerquality/received_events","type":"Organization","site_admin":false},"repo":{"id":44804930,"name":"gentle","full_name":"lowerquality/gentle","owner":{"login":"lowerquality","id":15257837,"avatar_url":"https://avatars0.githubusercontent.com/u/15257837?v=3","gravatar_id":"","url":"https://api.github.com/users/lowerquality","html_url":"https://github.com/lowerquality","followers_url":"https://api.github.com/users/lowerquality/followers","following_url":"https://api.github.com/users/lowerquality/following{/other_user}","gists_url":"https://api.github.com/users/lowerquality/gists{/gist_id}","starred_url":"https://api.github.com/users/lowerquality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowerquality/subscriptions","organizations_url":"https://api.github.com/users/lowerquality/orgs","repos_url":"https://api.github.com/users/lowerquality/repos","events_url":"https://api.github.com/users/lowerquality/events{/privacy}","received_events_url":"https://api.github.com/users/lowerquality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lowerquality/gentle","description":"gentle forced aligner","fork":false,"url":"https://api.github.com/repos/lowerquality/gentle","forks_url":"https://api.github.com/repos/lowerquality/gentle/forks","keys_url":"https://api.github.com/repos/lowerquality/gentle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lowerquality/gentle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lowerquality/gentle/teams","hooks_url":"https://api.github.com/repos/lowerquality/gentle/hooks","issue_events_url":"https://api.github.com/repos/lowerquality/gentle/issues/events{/number}","events_url":"https://api.github.com/repos/lowerquality/gentle/events","assignees_url":"https://api.github.com/repos/lowerquality/gentle/assignees{/user}","branches_url":"https://api.github.com/repos/lowerquality/gentle/branches{/branch}","tags_url":"https://api.github.com/repos/lowerquality/gentle/tags","blobs_url":"https://api.github.com/repos/lowerquality/gentle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lowerquality/gentle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lowerquality/gentle/git/refs{/sha}","trees_url":"https://api.github.com/repos/lowerquality/gentle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lowerquality/gentle/statuses/{sha}","languages_url":"https://api.github.com/repos/lowerquality/gentle/languages","stargazers_url":"https://api.github.com/repos/lowerquality/gentle/stargazers","contributors_url":"https://api.github.com/repos/lowerquality/gentle/contributors","subscribers_url":"https://api.github.com/repos/lowerquality/gentle/subscribers","subscription_url":"https://api.github.com/repos/lowerquality/gentle/subscription","commits_url":"https://api.github.com/repos/lowerquality/gentle/commits{/sha}","git_commits_url":"https://api.github.com/repos/lowerquality/gentle/git/commits{/sha}","comments_url":"https://api.github.com/repos/lowerquality/gentle/comments{/number}","issue_comment_url":"https://api.github.com/repos/lowerquality/gentle/issues/comments{/number}","contents_url":"https://api.github.com/repos/lowerquality/gentle/contents/{+path}","compare_url":"https://api.github.com/repos/lowerquality/gentle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lowerquality/gentle/merges","archive_url":"https://api.github.com/repos/lowerquality/gentle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lowerquality/gentle/downloads","issues_url":"https://api.github.com/repos/lowerquality/gentle/issues{/number}","pulls_url":"https://api.github.com/repos/lowerquality/gentle/pulls{/number}","milestones_url":"https://api.github.com/repos/lowerquality/gentle/milestones{/number}","notifications_url":"https://api.github.com/repos/lowerquality/gentle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lowerquality/gentle/labels{/name}","releases_url":"https://api.github.com/repos/lowerquality/gentle/releases{/id}","deployments_url":"https://api.github.com/repos/lowerquality/gentle/deployments","created_at":"2015-10-23T10:00:45Z","updated_at":"2017-05-01T18:45:58Z","pushed_at":"2017-05-03T06:14:23Z","git_url":"git://github.com/lowerquality/gentle.git","ssh_url":"git@github.com:lowerquality/gentle.git","clone_url":"https://github.com/lowerquality/gentle.git","svn_url":"https://github.com/lowerquality/gentle","homepage":"https://lowerquality.com/gentle/","size":1448,"stargazers_count":162,"watchers_count":162,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"open_issues_count":43,"forks":43,"open_issues":43,"watchers":162,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lowerquality/gentle/pulls/135"},"html":{"href":"https://github.com/lowerquality/gentle/pull/135"},"issue":{"href":"https://api.github.com/repos/lowerquality/gentle/issues/135"},"comments":{"href":"https://api.github.com/repos/lowerquality/gentle/issues/135/comments"},"review_comments":{"href":"https://api.github.com/repos/lowerquality/gentle/pulls/135/comments"},"review_comment":{"href":"https://api.github.com/repos/lowerquality/gentle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lowerquality/gentle/pulls/135/commits"},"statuses":{"href":"https://api.github.com/repos/lowerquality/gentle/statuses/c41d05d743d0c76154a391155f1770b1783909ab"}},"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"strob","id":208551,"avatar_url":"https://avatars0.githubusercontent.com/u/208551?v=3","gravatar_id":"","url":"https://api.github.com/users/strob","html_url":"https://github.com/strob","followers_url":"https://api.github.com/users/strob/followers","following_url":"https://api.github.com/users/strob/following{/other_user}","gists_url":"https://api.github.com/users/strob/gists{/gist_id}","starred_url":"https://api.github.com/users/strob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strob/subscriptions","organizations_url":"https://api.github.com/users/strob/orgs","repos_url":"https://api.github.com/users/strob/repos","events_url":"https://api.github.com/users/strob/events{/privacy}","received_events_url":"https://api.github.com/users/strob/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":18,"deletions":9,"changed_files":5}}
{"actor":{"display_login":"strob"}}