{"action":"closed","number":123,"pull_request":{"url":"https://api.github.com/repos/mbedmicro/pyOCD/pulls/123","id":33754050,"html_url":"https://github.com/mbedmicro/pyOCD/pull/123","diff_url":"https://github.com/mbedmicro/pyOCD/pull/123.diff","patch_url":"https://github.com/mbedmicro/pyOCD/pull/123.patch","issue_url":"https://api.github.com/repos/mbedmicro/pyOCD/issues/123","number":123,"state":"closed","locked":false,"title":"Refactoring for PyUSB backend","user":{"login":"Pithikos","id":400048,"avatar_url":"https://avatars.githubusercontent.com/u/400048?v=3","gravatar_id":"","url":"https://api.github.com/users/Pithikos","html_url":"https://github.com/Pithikos","followers_url":"https://api.github.com/users/Pithikos/followers","following_url":"https://api.github.com/users/Pithikos/following{/other_user}","gists_url":"https://api.github.com/users/Pithikos/gists{/gist_id}","starred_url":"https://api.github.com/users/Pithikos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pithikos/subscriptions","organizations_url":"https://api.github.com/users/Pithikos/orgs","repos_url":"https://api.github.com/users/Pithikos/repos","events_url":"https://api.github.com/users/Pithikos/events{/privacy}","received_events_url":"https://api.github.com/users/Pithikos/received_events","type":"User","site_admin":false},"body":"I did some refactoring while playing with PyOCD. Most of the refactoring is just making the code more pythonic (removing some redundant things).\r\n\r\nSome problematic value-checking is fixed as well. Namely in some cases `is` is used for checking of values. This might work now but since `is` does identity checking rather than value checking, some bugs might slip into the code.","created_at":"2015-04-21T11:59:39Z","updated_at":"2015-04-21T13:02:10Z","closed_at":"2015-04-21T13:02:10Z","merged_at":null,"merge_commit_sha":"b7d7e4dbfcdccc218543ce5833bbaf1091e8cd42","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mbedmicro/pyOCD/pulls/123/commits","review_comments_url":"https://api.github.com/repos/mbedmicro/pyOCD/pulls/123/comments","review_comment_url":"https://api.github.com/repos/mbedmicro/pyOCD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mbedmicro/pyOCD/issues/123/comments","statuses_url":"https://api.github.com/repos/mbedmicro/pyOCD/statuses/62ea4ca1e7f78347ffa8b6bc6a0b113e6f79039b","head":{"label":"Pithikos:master","ref":"master","sha":"62ea4ca1e7f78347ffa8b6bc6a0b113e6f79039b","user":{"login":"Pithikos","id":400048,"avatar_url":"https://avatars.githubusercontent.com/u/400048?v=3","gravatar_id":"","url":"https://api.github.com/users/Pithikos","html_url":"https://github.com/Pithikos","followers_url":"https://api.github.com/users/Pithikos/followers","following_url":"https://api.github.com/users/Pithikos/following{/other_user}","gists_url":"https://api.github.com/users/Pithikos/gists{/gist_id}","starred_url":"https://api.github.com/users/Pithikos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pithikos/subscriptions","organizations_url":"https://api.github.com/users/Pithikos/orgs","repos_url":"https://api.github.com/users/Pithikos/repos","events_url":"https://api.github.com/users/Pithikos/events{/privacy}","received_events_url":"https://api.github.com/users/Pithikos/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"mbedmicro:master","ref":"master","sha":"9cc1ff31939894e7e726e277b9b7ba1650e0818a","user":{"login":"mbedmicro","id":3626466,"avatar_url":"https://avatars.githubusercontent.com/u/3626466?v=3","gravatar_id":"","url":"https://api.github.com/users/mbedmicro","html_url":"https://github.com/mbedmicro","followers_url":"https://api.github.com/users/mbedmicro/followers","following_url":"https://api.github.com/users/mbedmicro/following{/other_user}","gists_url":"https://api.github.com/users/mbedmicro/gists{/gist_id}","starred_url":"https://api.github.com/users/mbedmicro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbedmicro/subscriptions","organizations_url":"https://api.github.com/users/mbedmicro/orgs","repos_url":"https://api.github.com/users/mbedmicro/repos","events_url":"https://api.github.com/users/mbedmicro/events{/privacy}","received_events_url":"https://api.github.com/users/mbedmicro/received_events","type":"Organization","site_admin":false},"repo":{"id":13862423,"name":"pyOCD","full_name":"mbedmicro/pyOCD","owner":{"login":"mbedmicro","id":3626466,"avatar_url":"https://avatars.githubusercontent.com/u/3626466?v=3","gravatar_id":"","url":"https://api.github.com/users/mbedmicro","html_url":"https://github.com/mbedmicro","followers_url":"https://api.github.com/users/mbedmicro/followers","following_url":"https://api.github.com/users/mbedmicro/following{/other_user}","gists_url":"https://api.github.com/users/mbedmicro/gists{/gist_id}","starred_url":"https://api.github.com/users/mbedmicro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbedmicro/subscriptions","organizations_url":"https://api.github.com/users/mbedmicro/orgs","repos_url":"https://api.github.com/users/mbedmicro/repos","events_url":"https://api.github.com/users/mbedmicro/events{/privacy}","received_events_url":"https://api.github.com/users/mbedmicro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mbedmicro/pyOCD","description":"Open source python library for programming and debugging ARM Cortex-M microcontrollers using CMSIS-DAP","fork":false,"url":"https://api.github.com/repos/mbedmicro/pyOCD","forks_url":"https://api.github.com/repos/mbedmicro/pyOCD/forks","keys_url":"https://api.github.com/repos/mbedmicro/pyOCD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbedmicro/pyOCD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbedmicro/pyOCD/teams","hooks_url":"https://api.github.com/repos/mbedmicro/pyOCD/hooks","issue_events_url":"https://api.github.com/repos/mbedmicro/pyOCD/issues/events{/number}","events_url":"https://api.github.com/repos/mbedmicro/pyOCD/events","assignees_url":"https://api.github.com/repos/mbedmicro/pyOCD/assignees{/user}","branches_url":"https://api.github.com/repos/mbedmicro/pyOCD/branches{/branch}","tags_url":"https://api.github.com/repos/mbedmicro/pyOCD/tags","blobs_url":"https://api.github.com/repos/mbedmicro/pyOCD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbedmicro/pyOCD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbedmicro/pyOCD/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbedmicro/pyOCD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbedmicro/pyOCD/statuses/{sha}","languages_url":"https://api.github.com/repos/mbedmicro/pyOCD/languages","stargazers_url":"https://api.github.com/repos/mbedmicro/pyOCD/stargazers","contributors_url":"https://api.github.com/repos/mbedmicro/pyOCD/contributors","subscribers_url":"https://api.github.com/repos/mbedmicro/pyOCD/subscribers","subscription_url":"https://api.github.com/repos/mbedmicro/pyOCD/subscription","commits_url":"https://api.github.com/repos/mbedmicro/pyOCD/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbedmicro/pyOCD/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbedmicro/pyOCD/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbedmicro/pyOCD/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbedmicro/pyOCD/contents/{+path}","compare_url":"https://api.github.com/repos/mbedmicro/pyOCD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbedmicro/pyOCD/merges","archive_url":"https://api.github.com/repos/mbedmicro/pyOCD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbedmicro/pyOCD/downloads","issues_url":"https://api.github.com/repos/mbedmicro/pyOCD/issues{/number}","pulls_url":"https://api.github.com/repos/mbedmicro/pyOCD/pulls{/number}","milestones_url":"https://api.github.com/repos/mbedmicro/pyOCD/milestones{/number}","notifications_url":"https://api.github.com/repos/mbedmicro/pyOCD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbedmicro/pyOCD/labels{/name}","releases_url":"https://api.github.com/repos/mbedmicro/pyOCD/releases{/id}","created_at":"2013-10-25T14:10:05Z","updated_at":"2015-04-21T10:10:58Z","pushed_at":"2015-04-21T12:56:04Z","git_url":"git://github.com/mbedmicro/pyOCD.git","ssh_url":"git@github.com:mbedmicro/pyOCD.git","clone_url":"https://github.com/mbedmicro/pyOCD.git","svn_url":"https://github.com/mbedmicro/pyOCD","homepage":null,"size":1613,"stargazers_count":61,"watchers_count":61,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":18,"forks":52,"open_issues":18,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mbedmicro/pyOCD/pulls/123"},"html":{"href":"https://github.com/mbedmicro/pyOCD/pull/123"},"issue":{"href":"https://api.github.com/repos/mbedmicro/pyOCD/issues/123"},"comments":{"href":"https://api.github.com/repos/mbedmicro/pyOCD/issues/123/comments"},"review_comments":{"href":"https://api.github.com/repos/mbedmicro/pyOCD/pulls/123/comments"},"review_comment":{"href":"https://api.github.com/repos/mbedmicro/pyOCD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mbedmicro/pyOCD/pulls/123/commits"},"statuses":{"href":"https://api.github.com/repos/mbedmicro/pyOCD/statuses/62ea4ca1e7f78347ffa8b6bc6a0b113e6f79039b"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":3,"review_comments":0,"commits":2,"additions":10,"deletions":27,"changed_files":1}}