{"action":"created","comment":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/comments/80395318","id":80395318,"diff_hunk":"@@ -152,10 +154,25 @@ def validate(self):\n             raise\n             \n     def _fixname(self,name):\n-        name = name.replace(\"mr-mime\",\"mr. mime\")\n-        name = name.replace(\"farfetchd\",\"farfetch'd\")\n+        if name:\n+            name = name.replace(\"mr-mime\",\"mr. mime\")\n+            name = name.replace(\"farfetchd\",\"farfetch'd\")\n+            name = name.replace(\"Nidoran\\u2642\",\"nidoran m\")\n+            name = name.replace(\"Nidoran\\u2640\",\"nidoran f\")","path":"pokemongo_bot/cell_workers/sniper.py","position":28,"original_position":28,"commit_id":"0e89d08a978b51ca3ccb7141b94e4dd476a8bcac","original_commit_id":"0e89d08a978b51ca3ccb7141b94e4dd476a8bcac","user":{"login":"Gobberwart","id":20783738,"avatar_url":"https://avatars.githubusercontent.com/u/20783738?v=3","gravatar_id":"","url":"https://api.github.com/users/Gobberwart","html_url":"https://github.com/Gobberwart","followers_url":"https://api.github.com/users/Gobberwart/followers","following_url":"https://api.github.com/users/Gobberwart/following{/other_user}","gists_url":"https://api.github.com/users/Gobberwart/gists{/gist_id}","starred_url":"https://api.github.com/users/Gobberwart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gobberwart/subscriptions","organizations_url":"https://api.github.com/users/Gobberwart/orgs","repos_url":"https://api.github.com/users/Gobberwart/repos","events_url":"https://api.github.com/users/Gobberwart/events{/privacy}","received_events_url":"https://api.github.com/users/Gobberwart/received_events","type":"User","site_admin":false},"body":"Read the description","created_at":"2016-09-25T23:50:53Z","updated_at":"2016-09-25T23:50:53Z","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/5674#discussion_r80395318","pull_request_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/5674","_links":{"self":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/comments/80395318"},"html":{"href":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/5674#discussion_r80395318"},"pull_request":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/5674"}}},"pull_request":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/5674","id":86665049,"html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/5674","diff_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/5674.diff","patch_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/5674.patch","issue_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/5674","number":5674,"state":"open","locked":false,"title":"[Sniper] Fix cache, and name matching tweak","user":{"login":"Gobberwart","id":20783738,"avatar_url":"https://avatars.githubusercontent.com/u/20783738?v=3","gravatar_id":"","url":"https://api.github.com/users/Gobberwart","html_url":"https://github.com/Gobberwart","followers_url":"https://api.github.com/users/Gobberwart/followers","following_url":"https://api.github.com/users/Gobberwart/following{/other_user}","gists_url":"https://api.github.com/users/Gobberwart/gists{/gist_id}","starred_url":"https://api.github.com/users/Gobberwart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gobberwart/subscriptions","organizations_url":"https://api.github.com/users/Gobberwart/orgs","repos_url":"https://api.github.com/users/Gobberwart/repos","events_url":"https://api.github.com/users/Gobberwart/events{/privacy}","received_events_url":"https://api.github.com/users/Gobberwart/received_events","type":"User","site_admin":false},"body":"## Short Description:\r\n\r\nTwo issues fixed here. \r\n\r\n1. Existing cache is not persistent, and gets reset every time the task runs, which results in repeated failed attempts to catch non-existent/otherwise failed pokemon. Even if cache hits, still generates an unnecessary log message. Changed to persistent cache, and check before attempting to snipe.\r\n\r\n2. Name matching can be flaky depending on sources. Added method to manually fix names we know about, or use difflib (as with pokemonoptimizer) to try and match any we haven't already caught. Note that difflib alone is not sufficient for this, eg. it thinks source name \"mr-mime\" is a Grimer. Close but no cigar.","created_at":"2016-09-25T22:33:50Z","updated_at":"2016-09-25T23:50:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14d12a012fe0395ba4cc2752a9c7f375adcc4eac","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/5674/commits","review_comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/5674/comments","review_comment_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/5674/comments","statuses_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/statuses/0e89d08a978b51ca3ccb7141b94e4dd476a8bcac","head":{"label":"Gobberwart:gobb_snipesource","ref":"gobb_snipesource","sha":"0e89d08a978b51ca3ccb7141b94e4dd476a8bcac","user":{"login":"Gobberwart","id":20783738,"avatar_url":"https://avatars.githubusercontent.com/u/20783738?v=3","gravatar_id":"","url":"https://api.github.com/users/Gobberwart","html_url":"https://github.com/Gobberwart","followers_url":"https://api.github.com/users/Gobberwart/followers","following_url":"https://api.github.com/users/Gobberwart/following{/other_user}","gists_url":"https://api.github.com/users/Gobberwart/gists{/gist_id}","starred_url":"https://api.github.com/users/Gobberwart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gobberwart/subscriptions","organizations_url":"https://api.github.com/users/Gobberwart/orgs","repos_url":"https://api.github.com/users/Gobberwart/repos","events_url":"https://api.github.com/users/Gobberwart/events{/privacy}","received_events_url":"https://api.github.com/users/Gobberwart/received_events","type":"User","site_admin":false},"repo":{"id":68338595,"name":"PokemonGo-Bot","full_name":"Gobberwart/PokemonGo-Bot","owner":{"login":"Gobberwart","id":20783738,"avatar_url":"https://avatars.githubusercontent.com/u/20783738?v=3","gravatar_id":"","url":"https://api.github.com/users/Gobberwart","html_url":"https://github.com/Gobberwart","followers_url":"https://api.github.com/users/Gobberwart/followers","following_url":"https://api.github.com/users/Gobberwart/following{/other_user}","gists_url":"https://api.github.com/users/Gobberwart/gists{/gist_id}","starred_url":"https://api.github.com/users/Gobberwart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gobberwart/subscriptions","organizations_url":"https://api.github.com/users/Gobberwart/orgs","repos_url":"https://api.github.com/users/Gobberwart/repos","events_url":"https://api.github.com/users/Gobberwart/events{/privacy}","received_events_url":"https://api.github.com/users/Gobberwart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gobberwart/PokemonGo-Bot","description":"The Pokemon Go Bot, baking with community.","fork":true,"url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot","forks_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/forks","keys_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/teams","hooks_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/hooks","issue_events_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/issues/events{/number}","events_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/events","assignees_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/assignees{/user}","branches_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/branches{/branch}","tags_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/tags","blobs_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/statuses/{sha}","languages_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/languages","stargazers_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/stargazers","contributors_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/contributors","subscribers_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/subscribers","subscription_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/subscription","commits_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/contents/{+path}","compare_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/merges","archive_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/downloads","issues_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/issues{/number}","pulls_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/pulls{/number}","milestones_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/milestones{/number}","notifications_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/labels{/name}","releases_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/releases{/id}","deployments_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/deployments","created_at":"2016-09-15T23:12:32Z","updated_at":"2016-09-15T23:12:34Z","pushed_at":"2016-09-25T23:27:56Z","git_url":"git://github.com/Gobberwart/PokemonGo-Bot.git","ssh_url":"git@github.com:Gobberwart/PokemonGo-Bot.git","clone_url":"https://github.com/Gobberwart/PokemonGo-Bot.git","svn_url":"https://github.com/Gobberwart/PokemonGo-Bot","homepage":"http://maps.pikabot.org","size":11615,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"PokemonGoF:dev","ref":"dev","sha":"28c648fa6ceddf85284c9c53abf5ec387c53ea71","user":{"login":"PokemonGoF","id":20551204,"avatar_url":"https://avatars.githubusercontent.com/u/20551204?v=3","gravatar_id":"","url":"https://api.github.com/users/PokemonGoF","html_url":"https://github.com/PokemonGoF","followers_url":"https://api.github.com/users/PokemonGoF/followers","following_url":"https://api.github.com/users/PokemonGoF/following{/other_user}","gists_url":"https://api.github.com/users/PokemonGoF/gists{/gist_id}","starred_url":"https://api.github.com/users/PokemonGoF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PokemonGoF/subscriptions","organizations_url":"https://api.github.com/users/PokemonGoF/orgs","repos_url":"https://api.github.com/users/PokemonGoF/repos","events_url":"https://api.github.com/users/PokemonGoF/events{/privacy}","received_events_url":"https://api.github.com/users/PokemonGoF/received_events","type":"Organization","site_admin":false},"repo":{"id":63752974,"name":"PokemonGo-Bot","full_name":"PokemonGoF/PokemonGo-Bot","owner":{"login":"PokemonGoF","id":20551204,"avatar_url":"https://avatars.githubusercontent.com/u/20551204?v=3","gravatar_id":"","url":"https://api.github.com/users/PokemonGoF","html_url":"https://github.com/PokemonGoF","followers_url":"https://api.github.com/users/PokemonGoF/followers","following_url":"https://api.github.com/users/PokemonGoF/following{/other_user}","gists_url":"https://api.github.com/users/PokemonGoF/gists{/gist_id}","starred_url":"https://api.github.com/users/PokemonGoF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PokemonGoF/subscriptions","organizations_url":"https://api.github.com/users/PokemonGoF/orgs","repos_url":"https://api.github.com/users/PokemonGoF/repos","events_url":"https://api.github.com/users/PokemonGoF/events{/privacy}","received_events_url":"https://api.github.com/users/PokemonGoF/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PokemonGoF/PokemonGo-Bot","description":"The Pokemon Go Bot, baking with community.","fork":false,"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot","forks_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/forks","keys_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/teams","hooks_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/hooks","issue_events_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/events{/number}","events_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/events","assignees_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/assignees{/user}","branches_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/branches{/branch}","tags_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/tags","blobs_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/statuses/{sha}","languages_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/languages","stargazers_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/stargazers","contributors_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/contributors","subscribers_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/subscribers","subscription_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/subscription","commits_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/contents/{+path}","compare_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/merges","archive_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/downloads","issues_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues{/number}","pulls_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls{/number}","milestones_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/milestones{/number}","notifications_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/labels{/name}","releases_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/releases{/id}","deployments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/deployments","created_at":"2016-07-20T05:31:53Z","updated_at":"2016-09-25T16:42:48Z","pushed_at":"2016-09-25T23:35:59Z","git_url":"git://github.com/PokemonGoF/PokemonGo-Bot.git","ssh_url":"git@github.com:PokemonGoF/PokemonGo-Bot.git","clone_url":"https://github.com/PokemonGoF/PokemonGo-Bot.git","svn_url":"https://github.com/PokemonGoF/PokemonGo-Bot","homepage":"http://maps.pikabot.org","size":18352,"stargazers_count":3809,"watchers_count":3809,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1795,"mirror_url":null,"open_issues_count":142,"forks":1795,"open_issues":142,"watchers":3809,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/5674"},"html":{"href":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/5674"},"issue":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/5674"},"comments":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/5674/comments"},"review_comments":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/5674/comments"},"review_comment":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/5674/commits"},"statuses":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/statuses/0e89d08a978b51ca3ccb7141b94e4dd476a8bcac"}}}}
{"actor":{"display_login":"Gobberwart"}}