{"action":"created","comment":{"url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/comments/236035608","pull_request_review_id":178043870,"id":236035608,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjAzNTYwOA==","diff_hunk":"@@ -346,3 +354,214 @@ def all_off(self):\n \n         for led in self.leds.values():\n             led.brightness = 0\n+\n+    def reset(self):\n+        \"\"\"\n+        Put the LEDs back to their default state of GREEN\n+        \"\"\"\n+\n+        if not self.leds:\n+            return\n+\n+        self.set_color('LEFT', 'GREEN')\n+        self.set_color('RIGHT', 'GREEN')\n+\n+\n+class LedAnimate(threading.Thread):","path":"ev3dev2/led.py","position":127,"original_position":127,"commit_id":"885a4eaf23ef5f2de3cbe46f3c2468d6a72c95e1","original_commit_id":"885a4eaf23ef5f2de3cbe46f3c2468d6a72c95e1","user":{"login":"WasabiFan","id":3310349,"node_id":"MDQ6VXNlcjMzMTAzNDk=","avatar_url":"https://avatars0.githubusercontent.com/u/3310349?v=4","gravatar_id":"","url":"https://api.github.com/users/WasabiFan","html_url":"https://github.com/WasabiFan","followers_url":"https://api.github.com/users/WasabiFan/followers","following_url":"https://api.github.com/users/WasabiFan/following{/other_user}","gists_url":"https://api.github.com/users/WasabiFan/gists{/gist_id}","starred_url":"https://api.github.com/users/WasabiFan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WasabiFan/subscriptions","organizations_url":"https://api.github.com/users/WasabiFan/orgs","repos_url":"https://api.github.com/users/WasabiFan/repos","events_url":"https://api.github.com/users/WasabiFan/events{/privacy}","received_events_url":"https://api.github.com/users/WasabiFan/received_events","type":"User","site_admin":false},"body":"Putting aside other pros/cons of the pattern, depending on the API of `Thread` breaks micropython compatibility, so to protect that I would like to avoid tying our public API surface to that of Python threads. The demo repository is its own case as breaking changes don't impact users. I believe it can be done by replacing the superclass with a line in the constructor which instantiates a [Thread](https://docs.python.org/3/library/threading.html#threading.Thread) with `target=self.run` and then adding a class method which starts the thread. It would be nice to also add micropython support with its respective threading API, but we can handle that separately.","created_at":"2018-11-24T08:11:07Z","updated_at":"2018-11-24T08:11:08Z","html_url":"https://github.com/ev3dev/ev3dev-lang-python/pull/567#discussion_r236035608","pull_request_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/567","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/comments/236035608"},"html":{"href":"https://github.com/ev3dev/ev3dev-lang-python/pull/567#discussion_r236035608"},"pull_request":{"href":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/567"}},"in_reply_to_id":235619467},"pull_request":{"url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/567","id":231239213,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMjM5MjEz","html_url":"https://github.com/ev3dev/ev3dev-lang-python/pull/567","diff_url":"https://github.com/ev3dev/ev3dev-lang-python/pull/567.diff","patch_url":"https://github.com/ev3dev/ev3dev-lang-python/pull/567.patch","issue_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/issues/567","number":567,"state":"open","locked":false,"title":"LED animation support","user":{"login":"dwalton76","id":468309,"node_id":"MDQ6VXNlcjQ2ODMwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/468309?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalton76","html_url":"https://github.com/dwalton76","followers_url":"https://api.github.com/users/dwalton76/followers","following_url":"https://api.github.com/users/dwalton76/following{/other_user}","gists_url":"https://api.github.com/users/dwalton76/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalton76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalton76/subscriptions","organizations_url":"https://api.github.com/users/dwalton76/orgs","repos_url":"https://api.github.com/users/dwalton76/repos","events_url":"https://api.github.com/users/dwalton76/events{/privacy}","received_events_url":"https://api.github.com/users/dwalton76/received_events","type":"User","site_admin":false},"body":"For issue #357 and #324 ","created_at":"2018-11-15T15:40:23Z","updated_at":"2018-11-24T08:11:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c15e16afbcf066a96a5d9a225891a9be6e4a560b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/567/commits","review_comments_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/567/comments","review_comment_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/issues/567/comments","statuses_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/statuses/885a4eaf23ef5f2de3cbe46f3c2468d6a72c95e1","head":{"label":"dwalton76:led","ref":"led","sha":"885a4eaf23ef5f2de3cbe46f3c2468d6a72c95e1","user":{"login":"dwalton76","id":468309,"node_id":"MDQ6VXNlcjQ2ODMwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/468309?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalton76","html_url":"https://github.com/dwalton76","followers_url":"https://api.github.com/users/dwalton76/followers","following_url":"https://api.github.com/users/dwalton76/following{/other_user}","gists_url":"https://api.github.com/users/dwalton76/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalton76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalton76/subscriptions","organizations_url":"https://api.github.com/users/dwalton76/orgs","repos_url":"https://api.github.com/users/dwalton76/repos","events_url":"https://api.github.com/users/dwalton76/events{/privacy}","received_events_url":"https://api.github.com/users/dwalton76/received_events","type":"User","site_admin":false},"repo":{"id":154533399,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ1MzMzOTk=","name":"ev3dev-lang-python","full_name":"dwalton76/ev3dev-lang-python","private":false,"owner":{"login":"dwalton76","id":468309,"node_id":"MDQ6VXNlcjQ2ODMwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/468309?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalton76","html_url":"https://github.com/dwalton76","followers_url":"https://api.github.com/users/dwalton76/followers","following_url":"https://api.github.com/users/dwalton76/following{/other_user}","gists_url":"https://api.github.com/users/dwalton76/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalton76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalton76/subscriptions","organizations_url":"https://api.github.com/users/dwalton76/orgs","repos_url":"https://api.github.com/users/dwalton76/repos","events_url":"https://api.github.com/users/dwalton76/events{/privacy}","received_events_url":"https://api.github.com/users/dwalton76/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dwalton76/ev3dev-lang-python","description":"Pure python bindings for ev3dev","fork":true,"url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python","forks_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/forks","keys_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/teams","hooks_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/hooks","issue_events_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/issues/events{/number}","events_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/events","assignees_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/assignees{/user}","branches_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/branches{/branch}","tags_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/tags","blobs_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/statuses/{sha}","languages_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/languages","stargazers_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/stargazers","contributors_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/contributors","subscribers_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/subscribers","subscription_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/subscription","commits_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/contents/{+path}","compare_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/merges","archive_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/downloads","issues_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/issues{/number}","pulls_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/pulls{/number}","milestones_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/milestones{/number}","notifications_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/labels{/name}","releases_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/releases{/id}","deployments_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/deployments","created_at":"2018-10-24T16:28:32Z","updated_at":"2018-11-14T12:46:02Z","pushed_at":"2018-11-21T14:06:43Z","git_url":"git://github.com/dwalton76/ev3dev-lang-python.git","ssh_url":"git@github.com:dwalton76/ev3dev-lang-python.git","clone_url":"https://github.com/dwalton76/ev3dev-lang-python.git","svn_url":"https://github.com/dwalton76/ev3dev-lang-python","homepage":null,"size":9803,"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,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"ev3dev-stretch"}},"base":{"label":"ev3dev:ev3dev-stretch","ref":"ev3dev-stretch","sha":"04f705f4ea981f08b6382ff4e01c1861ac365b2b","user":{"login":"ev3dev","id":6878323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NzgzMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6878323?v=4","gravatar_id":"","url":"https://api.github.com/users/ev3dev","html_url":"https://github.com/ev3dev","followers_url":"https://api.github.com/users/ev3dev/followers","following_url":"https://api.github.com/users/ev3dev/following{/other_user}","gists_url":"https://api.github.com/users/ev3dev/gists{/gist_id}","starred_url":"https://api.github.com/users/ev3dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev3dev/subscriptions","organizations_url":"https://api.github.com/users/ev3dev/orgs","repos_url":"https://api.github.com/users/ev3dev/repos","events_url":"https://api.github.com/users/ev3dev/events{/privacy}","received_events_url":"https://api.github.com/users/ev3dev/received_events","type":"Organization","site_admin":false},"repo":{"id":43603757,"node_id":"MDEwOlJlcG9zaXRvcnk0MzYwMzc1Nw==","name":"ev3dev-lang-python","full_name":"ev3dev/ev3dev-lang-python","private":false,"owner":{"login":"ev3dev","id":6878323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NzgzMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/6878323?v=4","gravatar_id":"","url":"https://api.github.com/users/ev3dev","html_url":"https://github.com/ev3dev","followers_url":"https://api.github.com/users/ev3dev/followers","following_url":"https://api.github.com/users/ev3dev/following{/other_user}","gists_url":"https://api.github.com/users/ev3dev/gists{/gist_id}","starred_url":"https://api.github.com/users/ev3dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev3dev/subscriptions","organizations_url":"https://api.github.com/users/ev3dev/orgs","repos_url":"https://api.github.com/users/ev3dev/repos","events_url":"https://api.github.com/users/ev3dev/events{/privacy}","received_events_url":"https://api.github.com/users/ev3dev/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ev3dev/ev3dev-lang-python","description":"Pure python bindings for ev3dev","fork":false,"url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python","forks_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/forks","keys_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/teams","hooks_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/hooks","issue_events_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/issues/events{/number}","events_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/events","assignees_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/assignees{/user}","branches_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/branches{/branch}","tags_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/tags","blobs_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/statuses/{sha}","languages_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/languages","stargazers_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/stargazers","contributors_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/contributors","subscribers_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/subscribers","subscription_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/subscription","commits_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/contents/{+path}","compare_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/merges","archive_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/downloads","issues_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/issues{/number}","pulls_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls{/number}","milestones_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/milestones{/number}","notifications_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/labels{/name}","releases_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/releases{/id}","deployments_url":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/deployments","created_at":"2015-10-03T15:32:20Z","updated_at":"2018-11-23T04:36:26Z","pushed_at":"2018-11-22T15:15:28Z","git_url":"git://github.com/ev3dev/ev3dev-lang-python.git","ssh_url":"git@github.com:ev3dev/ev3dev-lang-python.git","clone_url":"https://github.com/ev3dev/ev3dev-lang-python.git","svn_url":"https://github.com/ev3dev/ev3dev-lang-python","homepage":null,"size":9773,"stargazers_count":210,"watchers_count":210,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":78,"mirror_url":null,"archived":false,"open_issues_count":37,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":78,"open_issues":37,"watchers":210,"default_branch":"ev3dev-stretch"}},"_links":{"self":{"href":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/567"},"html":{"href":"https://github.com/ev3dev/ev3dev-lang-python/pull/567"},"issue":{"href":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/issues/567"},"comments":{"href":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/issues/567/comments"},"review_comments":{"href":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/567/comments"},"review_comment":{"href":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/pulls/567/commits"},"statuses":{"href":"https://api.github.com/repos/ev3dev/ev3dev-lang-python/statuses/885a4eaf23ef5f2de3cbe46f3c2468d6a72c95e1"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"WasabiFan"}}