{"action":"created","comment":{"url":"https://api.github.com/repos/christiansandberg/canopen/pulls/comments/216768736","pull_request_review_id":154330033,"id":216768736,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjc2ODczNg==","diff_hunk":"@@ -30,13 +30,18 @@ def __iter__(self):\n         return iter(self.map)\n \n     def __getitem__(self, key):\n-        if isinstance(key, int):\n+        if isinstance(key, int) and key in list(set(range(0x1A00, 0x1A80) + # By TPDO ID\n+                                                    range(0x1600, 0x1680) + # By RPDO ID\n+                                                    range(0, 80))):         # By PDO Index\n             return self.map[key]\n         else:\n             for pdo_map in self.map.values():\n-                for var in pdo_map.map:\n-                    if var.length and var.name == key:\n-                        return var\n+                try:\n+                    var = pdo_map[key]\n+                    return var\n+                except KeyError:\n+                    # ignore if one specific PDO does not have the key and try the next one\n+                    continue            ","path":"canopen/pdo/base.py","position":19,"original_position":19,"commit_id":"f1474f73fadd5dd8427916d0b740dd616e55204f","original_commit_id":"f1474f73fadd5dd8427916d0b740dd616e55204f","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Trailing whitespace](https://app.codacy.com/app/christiansandberg/canopen/pullRequest?prid=2152215)","created_at":"2018-09-11T18:14:35Z","updated_at":"2018-09-11T18:14:35Z","html_url":"https://github.com/christiansandberg/canopen/pull/110#discussion_r216768736","pull_request_url":"https://api.github.com/repos/christiansandberg/canopen/pulls/110","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/comments/216768736"},"html":{"href":"https://github.com/christiansandberg/canopen/pull/110#discussion_r216768736"},"pull_request":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/christiansandberg/canopen/pulls/110","id":213699345,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNjk5MzQ1","html_url":"https://github.com/christiansandberg/canopen/pull/110","diff_url":"https://github.com/christiansandberg/canopen/pull/110.diff","patch_url":"https://github.com/christiansandberg/canopen/pull/110.patch","issue_url":"https://api.github.com/repos/christiansandberg/canopen/issues/110","number":110,"state":"open","locked":false,"title":"Base DS402 implementation for controlling a remote node","user":{"login":"af-silva","id":11874980,"node_id":"MDQ6VXNlcjExODc0OTgw","avatar_url":"https://avatars2.githubusercontent.com/u/11874980?v=4","gravatar_id":"","url":"https://api.github.com/users/af-silva","html_url":"https://github.com/af-silva","followers_url":"https://api.github.com/users/af-silva/followers","following_url":"https://api.github.com/users/af-silva/following{/other_user}","gists_url":"https://api.github.com/users/af-silva/gists{/gist_id}","starred_url":"https://api.github.com/users/af-silva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/af-silva/subscriptions","organizations_url":"https://api.github.com/users/af-silva/orgs","repos_url":"https://api.github.com/users/af-silva/repos","events_url":"https://api.github.com/users/af-silva/events{/privacy}","received_events_url":"https://api.github.com/users/af-silva/received_events","type":"User","site_admin":false},"body":"The Base402Node is capable of:\n- Access to configured Statusword and Controlword (no hard config)\n- Access and change operations modes\n- Execute the configured homing procedure\n- Implemented the DS402 State Machine \n- Recover from fault\n\nIt depends on the pull request #{109}","created_at":"2018-09-06T17:50:24Z","updated_at":"2018-09-11T18:14:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c149d2fd4b7a550cc4bb4bea108b2f2f0a56c84","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/christiansandberg/canopen/pulls/110/commits","review_comments_url":"https://api.github.com/repos/christiansandberg/canopen/pulls/110/comments","review_comment_url":"https://api.github.com/repos/christiansandberg/canopen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/christiansandberg/canopen/issues/110/comments","statuses_url":"https://api.github.com/repos/christiansandberg/canopen/statuses/f1474f73fadd5dd8427916d0b740dd616e55204f","head":{"label":"Introsys:base402node","ref":"base402node","sha":"f1474f73fadd5dd8427916d0b740dd616e55204f","user":{"login":"Introsys","id":6554789,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1NTQ3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/6554789?v=4","gravatar_id":"","url":"https://api.github.com/users/Introsys","html_url":"https://github.com/Introsys","followers_url":"https://api.github.com/users/Introsys/followers","following_url":"https://api.github.com/users/Introsys/following{/other_user}","gists_url":"https://api.github.com/users/Introsys/gists{/gist_id}","starred_url":"https://api.github.com/users/Introsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Introsys/subscriptions","organizations_url":"https://api.github.com/users/Introsys/orgs","repos_url":"https://api.github.com/users/Introsys/repos","events_url":"https://api.github.com/users/Introsys/events{/privacy}","received_events_url":"https://api.github.com/users/Introsys/received_events","type":"Organization","site_admin":false},"repo":{"id":143851708,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM4NTE3MDg=","name":"canopen","full_name":"Introsys/canopen","owner":{"login":"Introsys","id":6554789,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1NTQ3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/6554789?v=4","gravatar_id":"","url":"https://api.github.com/users/Introsys","html_url":"https://github.com/Introsys","followers_url":"https://api.github.com/users/Introsys/followers","following_url":"https://api.github.com/users/Introsys/following{/other_user}","gists_url":"https://api.github.com/users/Introsys/gists{/gist_id}","starred_url":"https://api.github.com/users/Introsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Introsys/subscriptions","organizations_url":"https://api.github.com/users/Introsys/orgs","repos_url":"https://api.github.com/users/Introsys/repos","events_url":"https://api.github.com/users/Introsys/events{/privacy}","received_events_url":"https://api.github.com/users/Introsys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Introsys/canopen","description":"CANopen for Python","fork":true,"url":"https://api.github.com/repos/Introsys/canopen","forks_url":"https://api.github.com/repos/Introsys/canopen/forks","keys_url":"https://api.github.com/repos/Introsys/canopen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Introsys/canopen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Introsys/canopen/teams","hooks_url":"https://api.github.com/repos/Introsys/canopen/hooks","issue_events_url":"https://api.github.com/repos/Introsys/canopen/issues/events{/number}","events_url":"https://api.github.com/repos/Introsys/canopen/events","assignees_url":"https://api.github.com/repos/Introsys/canopen/assignees{/user}","branches_url":"https://api.github.com/repos/Introsys/canopen/branches{/branch}","tags_url":"https://api.github.com/repos/Introsys/canopen/tags","blobs_url":"https://api.github.com/repos/Introsys/canopen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Introsys/canopen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Introsys/canopen/git/refs{/sha}","trees_url":"https://api.github.com/repos/Introsys/canopen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Introsys/canopen/statuses/{sha}","languages_url":"https://api.github.com/repos/Introsys/canopen/languages","stargazers_url":"https://api.github.com/repos/Introsys/canopen/stargazers","contributors_url":"https://api.github.com/repos/Introsys/canopen/contributors","subscribers_url":"https://api.github.com/repos/Introsys/canopen/subscribers","subscription_url":"https://api.github.com/repos/Introsys/canopen/subscription","commits_url":"https://api.github.com/repos/Introsys/canopen/commits{/sha}","git_commits_url":"https://api.github.com/repos/Introsys/canopen/git/commits{/sha}","comments_url":"https://api.github.com/repos/Introsys/canopen/comments{/number}","issue_comment_url":"https://api.github.com/repos/Introsys/canopen/issues/comments{/number}","contents_url":"https://api.github.com/repos/Introsys/canopen/contents/{+path}","compare_url":"https://api.github.com/repos/Introsys/canopen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Introsys/canopen/merges","archive_url":"https://api.github.com/repos/Introsys/canopen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Introsys/canopen/downloads","issues_url":"https://api.github.com/repos/Introsys/canopen/issues{/number}","pulls_url":"https://api.github.com/repos/Introsys/canopen/pulls{/number}","milestones_url":"https://api.github.com/repos/Introsys/canopen/milestones{/number}","notifications_url":"https://api.github.com/repos/Introsys/canopen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Introsys/canopen/labels{/name}","releases_url":"https://api.github.com/repos/Introsys/canopen/releases{/id}","deployments_url":"https://api.github.com/repos/Introsys/canopen/deployments","created_at":"2018-08-07T09:36:33Z","updated_at":"2018-09-06T20:54:48Z","pushed_at":"2018-09-11T18:11:35Z","git_url":"git://github.com/Introsys/canopen.git","ssh_url":"git@github.com:Introsys/canopen.git","clone_url":"https://github.com/Introsys/canopen.git","svn_url":"https://github.com/Introsys/canopen","homepage":"http://canopen.readthedocs.io/","size":578,"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":"devel"}},"base":{"label":"christiansandberg:master","ref":"master","sha":"0920ee2204afcdddca80aecfccc42e8a0db33a0e","user":{"login":"christiansandberg","id":3647996,"node_id":"MDQ6VXNlcjM2NDc5OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/3647996?v=4","gravatar_id":"","url":"https://api.github.com/users/christiansandberg","html_url":"https://github.com/christiansandberg","followers_url":"https://api.github.com/users/christiansandberg/followers","following_url":"https://api.github.com/users/christiansandberg/following{/other_user}","gists_url":"https://api.github.com/users/christiansandberg/gists{/gist_id}","starred_url":"https://api.github.com/users/christiansandberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christiansandberg/subscriptions","organizations_url":"https://api.github.com/users/christiansandberg/orgs","repos_url":"https://api.github.com/users/christiansandberg/repos","events_url":"https://api.github.com/users/christiansandberg/events{/privacy}","received_events_url":"https://api.github.com/users/christiansandberg/received_events","type":"User","site_admin":false},"repo":{"id":68737600,"node_id":"MDEwOlJlcG9zaXRvcnk2ODczNzYwMA==","name":"canopen","full_name":"christiansandberg/canopen","owner":{"login":"christiansandberg","id":3647996,"node_id":"MDQ6VXNlcjM2NDc5OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/3647996?v=4","gravatar_id":"","url":"https://api.github.com/users/christiansandberg","html_url":"https://github.com/christiansandberg","followers_url":"https://api.github.com/users/christiansandberg/followers","following_url":"https://api.github.com/users/christiansandberg/following{/other_user}","gists_url":"https://api.github.com/users/christiansandberg/gists{/gist_id}","starred_url":"https://api.github.com/users/christiansandberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christiansandberg/subscriptions","organizations_url":"https://api.github.com/users/christiansandberg/orgs","repos_url":"https://api.github.com/users/christiansandberg/repos","events_url":"https://api.github.com/users/christiansandberg/events{/privacy}","received_events_url":"https://api.github.com/users/christiansandberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/christiansandberg/canopen","description":"CANopen for Python","fork":false,"url":"https://api.github.com/repos/christiansandberg/canopen","forks_url":"https://api.github.com/repos/christiansandberg/canopen/forks","keys_url":"https://api.github.com/repos/christiansandberg/canopen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/christiansandberg/canopen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/christiansandberg/canopen/teams","hooks_url":"https://api.github.com/repos/christiansandberg/canopen/hooks","issue_events_url":"https://api.github.com/repos/christiansandberg/canopen/issues/events{/number}","events_url":"https://api.github.com/repos/christiansandberg/canopen/events","assignees_url":"https://api.github.com/repos/christiansandberg/canopen/assignees{/user}","branches_url":"https://api.github.com/repos/christiansandberg/canopen/branches{/branch}","tags_url":"https://api.github.com/repos/christiansandberg/canopen/tags","blobs_url":"https://api.github.com/repos/christiansandberg/canopen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/christiansandberg/canopen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/christiansandberg/canopen/git/refs{/sha}","trees_url":"https://api.github.com/repos/christiansandberg/canopen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/christiansandberg/canopen/statuses/{sha}","languages_url":"https://api.github.com/repos/christiansandberg/canopen/languages","stargazers_url":"https://api.github.com/repos/christiansandberg/canopen/stargazers","contributors_url":"https://api.github.com/repos/christiansandberg/canopen/contributors","subscribers_url":"https://api.github.com/repos/christiansandberg/canopen/subscribers","subscription_url":"https://api.github.com/repos/christiansandberg/canopen/subscription","commits_url":"https://api.github.com/repos/christiansandberg/canopen/commits{/sha}","git_commits_url":"https://api.github.com/repos/christiansandberg/canopen/git/commits{/sha}","comments_url":"https://api.github.com/repos/christiansandberg/canopen/comments{/number}","issue_comment_url":"https://api.github.com/repos/christiansandberg/canopen/issues/comments{/number}","contents_url":"https://api.github.com/repos/christiansandberg/canopen/contents/{+path}","compare_url":"https://api.github.com/repos/christiansandberg/canopen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/christiansandberg/canopen/merges","archive_url":"https://api.github.com/repos/christiansandberg/canopen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/christiansandberg/canopen/downloads","issues_url":"https://api.github.com/repos/christiansandberg/canopen/issues{/number}","pulls_url":"https://api.github.com/repos/christiansandberg/canopen/pulls{/number}","milestones_url":"https://api.github.com/repos/christiansandberg/canopen/milestones{/number}","notifications_url":"https://api.github.com/repos/christiansandberg/canopen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/christiansandberg/canopen/labels{/name}","releases_url":"https://api.github.com/repos/christiansandberg/canopen/releases{/id}","deployments_url":"https://api.github.com/repos/christiansandberg/canopen/deployments","created_at":"2016-09-20T17:42:18Z","updated_at":"2018-09-06T19:10:48Z","pushed_at":"2018-09-11T18:11:36Z","git_url":"git://github.com/christiansandberg/canopen.git","ssh_url":"git@github.com:christiansandberg/canopen.git","clone_url":"https://github.com/christiansandberg/canopen.git","svn_url":"https://github.com/christiansandberg/canopen","homepage":"http://canopen.readthedocs.io/","size":440,"stargazers_count":73,"watchers_count":73,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":38,"open_issues":18,"watchers":73,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/110"},"html":{"href":"https://github.com/christiansandberg/canopen/pull/110"},"issue":{"href":"https://api.github.com/repos/christiansandberg/canopen/issues/110"},"comments":{"href":"https://api.github.com/repos/christiansandberg/canopen/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/christiansandberg/canopen/statuses/f1474f73fadd5dd8427916d0b740dd616e55204f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}