{"action":"created","comment":{"url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments/134589864","pull_request_review_id":57899017,"id":134589864,"diff_hunk":"@@ -0,0 +1,22 @@\n+import functools\n+from . import color\n+\n+USAGE = \"\"\"Colors is a list of colors.  Each color can be:\n+\n+* A list of three numbers: [0, 0, 0] or [255, 0, 255].\n+* A single number which represents a brightness/gray level: 0, 255, 127\n+* A string:  \"red\", \"yellow\", \"gold\" naming a color from ...colors.COLORS.\n+\n+All numbers must be in the range [0, 256) - 0 <= x < 256\n+\"\"\"\n+\n+\n+@functools.singledispatch\n+def make(c):\n+    raise ValueError(\"Don't understand type %s\" % type(c), USAGE)\n+\n+\n+@make.register(tuple)\n+@make.register(list)\n+def _(c):\n+    return [color.make(i) for i in c]","path":"bibliopixel/project/types/colors.py","position":22,"original_position":22,"commit_id":"8de30888381cfee7c9fc11f75a8a5482255420a1","original_commit_id":"8de30888381cfee7c9fc11f75a8a5482255420a1","user":{"login":"rec","id":253362,"avatar_url":"https://avatars2.githubusercontent.com/u/253362?v=4","gravatar_id":"","url":"https://api.github.com/users/rec","html_url":"https://github.com/rec","followers_url":"https://api.github.com/users/rec/followers","following_url":"https://api.github.com/users/rec/following{/other_user}","gists_url":"https://api.github.com/users/rec/gists{/gist_id}","starred_url":"https://api.github.com/users/rec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rec/subscriptions","organizations_url":"https://api.github.com/users/rec/orgs","repos_url":"https://api.github.com/users/rec/repos","events_url":"https://api.github.com/users/rec/events{/privacy}","received_events_url":"https://api.github.com/users/rec/received_events","type":"User","site_admin":false},"body":"It's `singledispatch`!\r\n\r\nhttps://docs.python.org/3/library/functools.html#functools.singledispatch\r\n\r\nA really nice facility, but rarely the correct solution to a problem.  However, this one problem it's perfect for (and is 90%+ of the time I've seen it used...)","created_at":"2017-08-22T20:17:02Z","updated_at":"2017-08-22T20:17:02Z","html_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/391#discussion_r134589864","pull_request_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/391","_links":{"self":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments/134589864"},"html":{"href":"https://github.com/ManiacalLabs/BiblioPixel/pull/391#discussion_r134589864"},"pull_request":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/391"}}},"pull_request":{"url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/391","id":137056894,"html_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/391","diff_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/391.diff","patch_url":"https://github.com/ManiacalLabs/BiblioPixel/pull/391.patch","issue_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/391","number":391,"state":"closed","locked":false,"title":"New colors type for projects","user":{"login":"rec","id":253362,"avatar_url":"https://avatars2.githubusercontent.com/u/253362?v=4","gravatar_id":"","url":"https://api.github.com/users/rec","html_url":"https://github.com/rec","followers_url":"https://api.github.com/users/rec/followers","following_url":"https://api.github.com/users/rec/following{/other_user}","gists_url":"https://api.github.com/users/rec/gists{/gist_id}","starred_url":"https://api.github.com/users/rec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rec/subscriptions","organizations_url":"https://api.github.com/users/rec/orgs","repos_url":"https://api.github.com/users/rec/repos","events_url":"https://api.github.com/users/rec/events{/privacy}","received_events_url":"https://api.github.com/users/rec/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-22T19:09:19Z","updated_at":"2017-08-22T20:17:02Z","closed_at":"2017-08-22T20:06:50Z","merged_at":"2017-08-22T20:06:50Z","merge_commit_sha":"4b8fab4b78472a71a14e4a4c07036f079618efe8","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/391/commits","review_comments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/391/comments","review_comment_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/391/comments","statuses_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/statuses/8de30888381cfee7c9fc11f75a8a5482255420a1","head":{"label":"rec:colors","ref":"colors","sha":"8de30888381cfee7c9fc11f75a8a5482255420a1","user":{"login":"rec","id":253362,"avatar_url":"https://avatars2.githubusercontent.com/u/253362?v=4","gravatar_id":"","url":"https://api.github.com/users/rec","html_url":"https://github.com/rec","followers_url":"https://api.github.com/users/rec/followers","following_url":"https://api.github.com/users/rec/following{/other_user}","gists_url":"https://api.github.com/users/rec/gists{/gist_id}","starred_url":"https://api.github.com/users/rec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rec/subscriptions","organizations_url":"https://api.github.com/users/rec/orgs","repos_url":"https://api.github.com/users/rec/repos","events_url":"https://api.github.com/users/rec/events{/privacy}","received_events_url":"https://api.github.com/users/rec/received_events","type":"User","site_admin":false},"repo":{"id":50255627,"name":"BiblioPixel","full_name":"rec/BiblioPixel","owner":{"login":"rec","id":253362,"avatar_url":"https://avatars2.githubusercontent.com/u/253362?v=4","gravatar_id":"","url":"https://api.github.com/users/rec","html_url":"https://github.com/rec","followers_url":"https://api.github.com/users/rec/followers","following_url":"https://api.github.com/users/rec/following{/other_user}","gists_url":"https://api.github.com/users/rec/gists{/gist_id}","starred_url":"https://api.github.com/users/rec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rec/subscriptions","organizations_url":"https://api.github.com/users/rec/orgs","repos_url":"https://api.github.com/users/rec/repos","events_url":"https://api.github.com/users/rec/events{/privacy}","received_events_url":"https://api.github.com/users/rec/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rec/BiblioPixel","description":"A pure Python 2 library for programming light animations: Please direct questions and support requests to http://forum.maniacallabs.com - The Issues list here should be reserved for actual bugs.","fork":true,"url":"https://api.github.com/repos/rec/BiblioPixel","forks_url":"https://api.github.com/repos/rec/BiblioPixel/forks","keys_url":"https://api.github.com/repos/rec/BiblioPixel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rec/BiblioPixel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rec/BiblioPixel/teams","hooks_url":"https://api.github.com/repos/rec/BiblioPixel/hooks","issue_events_url":"https://api.github.com/repos/rec/BiblioPixel/issues/events{/number}","events_url":"https://api.github.com/repos/rec/BiblioPixel/events","assignees_url":"https://api.github.com/repos/rec/BiblioPixel/assignees{/user}","branches_url":"https://api.github.com/repos/rec/BiblioPixel/branches{/branch}","tags_url":"https://api.github.com/repos/rec/BiblioPixel/tags","blobs_url":"https://api.github.com/repos/rec/BiblioPixel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rec/BiblioPixel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rec/BiblioPixel/git/refs{/sha}","trees_url":"https://api.github.com/repos/rec/BiblioPixel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rec/BiblioPixel/statuses/{sha}","languages_url":"https://api.github.com/repos/rec/BiblioPixel/languages","stargazers_url":"https://api.github.com/repos/rec/BiblioPixel/stargazers","contributors_url":"https://api.github.com/repos/rec/BiblioPixel/contributors","subscribers_url":"https://api.github.com/repos/rec/BiblioPixel/subscribers","subscription_url":"https://api.github.com/repos/rec/BiblioPixel/subscription","commits_url":"https://api.github.com/repos/rec/BiblioPixel/commits{/sha}","git_commits_url":"https://api.github.com/repos/rec/BiblioPixel/git/commits{/sha}","comments_url":"https://api.github.com/repos/rec/BiblioPixel/comments{/number}","issue_comment_url":"https://api.github.com/repos/rec/BiblioPixel/issues/comments{/number}","contents_url":"https://api.github.com/repos/rec/BiblioPixel/contents/{+path}","compare_url":"https://api.github.com/repos/rec/BiblioPixel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rec/BiblioPixel/merges","archive_url":"https://api.github.com/repos/rec/BiblioPixel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rec/BiblioPixel/downloads","issues_url":"https://api.github.com/repos/rec/BiblioPixel/issues{/number}","pulls_url":"https://api.github.com/repos/rec/BiblioPixel/pulls{/number}","milestones_url":"https://api.github.com/repos/rec/BiblioPixel/milestones{/number}","notifications_url":"https://api.github.com/repos/rec/BiblioPixel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rec/BiblioPixel/labels{/name}","releases_url":"https://api.github.com/repos/rec/BiblioPixel/releases{/id}","deployments_url":"https://api.github.com/repos/rec/BiblioPixel/deployments","created_at":"2016-01-23T19:55:57Z","updated_at":"2016-01-23T19:55:58Z","pushed_at":"2017-08-22T19:09:11Z","git_url":"git://github.com/rec/BiblioPixel.git","ssh_url":"git@github.com:rec/BiblioPixel.git","clone_url":"https://github.com/rec/BiblioPixel.git","svn_url":"https://github.com/rec/BiblioPixel","homepage":"http://maniacallabs.com","size":3229,"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":"ManiacalLabs:dev","ref":"dev","sha":"8f4a2bab6b94ee96d41c4ba5bdcfe372a49c29df","user":{"login":"ManiacalLabs","id":3926687,"avatar_url":"https://avatars2.githubusercontent.com/u/3926687?v=4","gravatar_id":"","url":"https://api.github.com/users/ManiacalLabs","html_url":"https://github.com/ManiacalLabs","followers_url":"https://api.github.com/users/ManiacalLabs/followers","following_url":"https://api.github.com/users/ManiacalLabs/following{/other_user}","gists_url":"https://api.github.com/users/ManiacalLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ManiacalLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManiacalLabs/subscriptions","organizations_url":"https://api.github.com/users/ManiacalLabs/orgs","repos_url":"https://api.github.com/users/ManiacalLabs/repos","events_url":"https://api.github.com/users/ManiacalLabs/events{/privacy}","received_events_url":"https://api.github.com/users/ManiacalLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":26373551,"name":"BiblioPixel","full_name":"ManiacalLabs/BiblioPixel","owner":{"login":"ManiacalLabs","id":3926687,"avatar_url":"https://avatars2.githubusercontent.com/u/3926687?v=4","gravatar_id":"","url":"https://api.github.com/users/ManiacalLabs","html_url":"https://github.com/ManiacalLabs","followers_url":"https://api.github.com/users/ManiacalLabs/followers","following_url":"https://api.github.com/users/ManiacalLabs/following{/other_user}","gists_url":"https://api.github.com/users/ManiacalLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ManiacalLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManiacalLabs/subscriptions","organizations_url":"https://api.github.com/users/ManiacalLabs/orgs","repos_url":"https://api.github.com/users/ManiacalLabs/repos","events_url":"https://api.github.com/users/ManiacalLabs/events{/privacy}","received_events_url":"https://api.github.com/users/ManiacalLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManiacalLabs/BiblioPixel","description":"A pure Python 3 library for programming light animations: Please direct questions and support requests to the Google Group: https://groups.google.com/d/forum/maniacal-labs-users - The Issues list here should be reserved for actual bugs.","fork":false,"url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel","forks_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/forks","keys_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/teams","hooks_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/hooks","issue_events_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/events{/number}","events_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/events","assignees_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/assignees{/user}","branches_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/branches{/branch}","tags_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/tags","blobs_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/statuses/{sha}","languages_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/languages","stargazers_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/stargazers","contributors_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/contributors","subscribers_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/subscribers","subscription_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/subscription","commits_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/contents/{+path}","compare_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/merges","archive_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/downloads","issues_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues{/number}","pulls_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls{/number}","milestones_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/milestones{/number}","notifications_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/labels{/name}","releases_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/releases{/id}","deployments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/deployments","created_at":"2014-11-08T20:23:53Z","updated_at":"2017-08-20T16:05:07Z","pushed_at":"2017-08-22T20:06:50Z","git_url":"git://github.com/ManiacalLabs/BiblioPixel.git","ssh_url":"git@github.com:ManiacalLabs/BiblioPixel.git","clone_url":"https://github.com/ManiacalLabs/BiblioPixel.git","svn_url":"https://github.com/ManiacalLabs/BiblioPixel","homepage":"http://maniacallabs.com","size":3156,"stargazers_count":170,"watchers_count":170,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":70,"forks":31,"open_issues":70,"watchers":170,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/391"},"html":{"href":"https://github.com/ManiacalLabs/BiblioPixel/pull/391"},"issue":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/391"},"comments":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/391/comments"},"review_comments":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/391/comments"},"review_comment":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/pulls/391/commits"},"statuses":{"href":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/statuses/8de30888381cfee7c9fc11f75a8a5482255420a1"}}}}
{"actor":{"display_login":"rec"}}