{"action":"created","comment":{"url":"https://api.github.com/repos/cristianav/PyCRC/pulls/comments/37431344","id":37431344,"diff_hunk":"@@ -38,6 +38,11 @@ def testCalculate(self):\n         msg = \"Calculated CRC16 for 0123456789 should be 0x443D\"\n         self.assertEqual(self.crc.calculate(\"0123456789\"), int('0x443D', 0), msg)\n \n+    def testCalculateBytearray(self):\n+        msg = \"Calculated CRC16 for 0123456789 should still be 0x443D\" \\\n+              \" when passing a bytearray parameter.\"\n+        self.assertEqual(self.crc.calculate(bytearray(\"0123456789\".encode('utf-8'))), int('0x443D', 0), msg)","path":"tests/test_CRC16.py","position":7,"original_position":7,"commit_id":"a8883a617dc3c63d8a6881fb76a589d47e8efcfc","original_commit_id":"a8883a617dc3c63d8a6881fb76a589d47e8efcfc","user":{"login":"jtpereyda","id":244969,"avatar_url":"https://avatars.githubusercontent.com/u/244969?v=3","gravatar_id":"","url":"https://api.github.com/users/jtpereyda","html_url":"https://github.com/jtpereyda","followers_url":"https://api.github.com/users/jtpereyda/followers","following_url":"https://api.github.com/users/jtpereyda/following{/other_user}","gists_url":"https://api.github.com/users/jtpereyda/gists{/gist_id}","starred_url":"https://api.github.com/users/jtpereyda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtpereyda/subscriptions","organizations_url":"https://api.github.com/users/jtpereyda/orgs","repos_url":"https://api.github.com/users/jtpereyda/repos","events_url":"https://api.github.com/users/jtpereyda/events{/privacy}","received_events_url":"https://api.github.com/users/jtpereyda/received_events","type":"User","site_admin":false},"body":"Is there a style guideline behind this? I don't recall why I put it on a separate line in the other files, but I don't think that sort of thing is prescribed by PEP8.\r\n\r\nIf it's the style for this code repo though, I can change that.","created_at":"2015-08-19T15:52:40Z","updated_at":"2015-08-19T15:52:40Z","html_url":"https://github.com/cristianav/PyCRC/pull/2#discussion_r37431344","pull_request_url":"https://api.github.com/repos/cristianav/PyCRC/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/cristianav/PyCRC/pulls/comments/37431344"},"html":{"href":"https://github.com/cristianav/PyCRC/pull/2#discussion_r37431344"},"pull_request":{"href":"https://api.github.com/repos/cristianav/PyCRC/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/cristianav/PyCRC/pulls/2","id":42617235,"html_url":"https://github.com/cristianav/PyCRC/pull/2","diff_url":"https://github.com/cristianav/PyCRC/pull/2.diff","patch_url":"https://github.com/cristianav/PyCRC/pull/2.patch","issue_url":"https://api.github.com/repos/cristianav/PyCRC/issues/2","number":2,"state":"open","locked":false,"title":"Bytearray Fix","user":{"login":"jtpereyda","id":244969,"avatar_url":"https://avatars.githubusercontent.com/u/244969?v=3","gravatar_id":"","url":"https://api.github.com/users/jtpereyda","html_url":"https://github.com/jtpereyda","followers_url":"https://api.github.com/users/jtpereyda/followers","following_url":"https://api.github.com/users/jtpereyda/following{/other_user}","gists_url":"https://api.github.com/users/jtpereyda/gists{/gist_id}","starred_url":"https://api.github.com/users/jtpereyda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtpereyda/subscriptions","organizations_url":"https://api.github.com/users/jtpereyda/orgs","repos_url":"https://api.github.com/users/jtpereyda/repos","events_url":"https://api.github.com/users/jtpereyda/events{/privacy}","received_events_url":"https://api.github.com/users/jtpereyda/received_events","type":"User","site_admin":false},"body":"Issue #1 \r\n- All CRC calculate methods now take `bytearray` parameters as well as `bytes`.\r\n- Added unit tests to verify `bytearray` is accepted.\r\n- Updated `.gitignore`. For me it blocked .py files, so I used `git add -f`, which also added all the `.pyc` files. Oops. Now it blocks only .pyc, .pyo, pyd.\r\n\r\nAll tests pass; test system is an Ubuntu 14.04 distro with Python 3.4.0 (AKA \"my machine\").","created_at":"2015-08-17T18:14:41Z","updated_at":"2015-08-19T15:52:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9245c142f56b36f4c20862c5cd5b8ea6d1dd0040","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cristianav/PyCRC/pulls/2/commits","review_comments_url":"https://api.github.com/repos/cristianav/PyCRC/pulls/2/comments","review_comment_url":"https://api.github.com/repos/cristianav/PyCRC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cristianav/PyCRC/issues/2/comments","statuses_url":"https://api.github.com/repos/cristianav/PyCRC/statuses/a8883a617dc3c63d8a6881fb76a589d47e8efcfc","head":{"label":"jtpereyda:bytearray-fix","ref":"bytearray-fix","sha":"a8883a617dc3c63d8a6881fb76a589d47e8efcfc","user":{"login":"jtpereyda","id":244969,"avatar_url":"https://avatars.githubusercontent.com/u/244969?v=3","gravatar_id":"","url":"https://api.github.com/users/jtpereyda","html_url":"https://github.com/jtpereyda","followers_url":"https://api.github.com/users/jtpereyda/followers","following_url":"https://api.github.com/users/jtpereyda/following{/other_user}","gists_url":"https://api.github.com/users/jtpereyda/gists{/gist_id}","starred_url":"https://api.github.com/users/jtpereyda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtpereyda/subscriptions","organizations_url":"https://api.github.com/users/jtpereyda/orgs","repos_url":"https://api.github.com/users/jtpereyda/repos","events_url":"https://api.github.com/users/jtpereyda/events{/privacy}","received_events_url":"https://api.github.com/users/jtpereyda/received_events","type":"User","site_admin":false},"repo":{"id":40915285,"name":"PyCRC","full_name":"jtpereyda/PyCRC","owner":{"login":"jtpereyda","id":244969,"avatar_url":"https://avatars.githubusercontent.com/u/244969?v=3","gravatar_id":"","url":"https://api.github.com/users/jtpereyda","html_url":"https://github.com/jtpereyda","followers_url":"https://api.github.com/users/jtpereyda/followers","following_url":"https://api.github.com/users/jtpereyda/following{/other_user}","gists_url":"https://api.github.com/users/jtpereyda/gists{/gist_id}","starred_url":"https://api.github.com/users/jtpereyda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtpereyda/subscriptions","organizations_url":"https://api.github.com/users/jtpereyda/orgs","repos_url":"https://api.github.com/users/jtpereyda/repos","events_url":"https://api.github.com/users/jtpereyda/events{/privacy}","received_events_url":"https://api.github.com/users/jtpereyda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jtpereyda/PyCRC","description":"Python libraries for CRC calculations (it supports CRC-16, CRC-32, CRC-CCITT, etc)","fork":true,"url":"https://api.github.com/repos/jtpereyda/PyCRC","forks_url":"https://api.github.com/repos/jtpereyda/PyCRC/forks","keys_url":"https://api.github.com/repos/jtpereyda/PyCRC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jtpereyda/PyCRC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jtpereyda/PyCRC/teams","hooks_url":"https://api.github.com/repos/jtpereyda/PyCRC/hooks","issue_events_url":"https://api.github.com/repos/jtpereyda/PyCRC/issues/events{/number}","events_url":"https://api.github.com/repos/jtpereyda/PyCRC/events","assignees_url":"https://api.github.com/repos/jtpereyda/PyCRC/assignees{/user}","branches_url":"https://api.github.com/repos/jtpereyda/PyCRC/branches{/branch}","tags_url":"https://api.github.com/repos/jtpereyda/PyCRC/tags","blobs_url":"https://api.github.com/repos/jtpereyda/PyCRC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jtpereyda/PyCRC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jtpereyda/PyCRC/git/refs{/sha}","trees_url":"https://api.github.com/repos/jtpereyda/PyCRC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jtpereyda/PyCRC/statuses/{sha}","languages_url":"https://api.github.com/repos/jtpereyda/PyCRC/languages","stargazers_url":"https://api.github.com/repos/jtpereyda/PyCRC/stargazers","contributors_url":"https://api.github.com/repos/jtpereyda/PyCRC/contributors","subscribers_url":"https://api.github.com/repos/jtpereyda/PyCRC/subscribers","subscription_url":"https://api.github.com/repos/jtpereyda/PyCRC/subscription","commits_url":"https://api.github.com/repos/jtpereyda/PyCRC/commits{/sha}","git_commits_url":"https://api.github.com/repos/jtpereyda/PyCRC/git/commits{/sha}","comments_url":"https://api.github.com/repos/jtpereyda/PyCRC/comments{/number}","issue_comment_url":"https://api.github.com/repos/jtpereyda/PyCRC/issues/comments{/number}","contents_url":"https://api.github.com/repos/jtpereyda/PyCRC/contents/{+path}","compare_url":"https://api.github.com/repos/jtpereyda/PyCRC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jtpereyda/PyCRC/merges","archive_url":"https://api.github.com/repos/jtpereyda/PyCRC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jtpereyda/PyCRC/downloads","issues_url":"https://api.github.com/repos/jtpereyda/PyCRC/issues{/number}","pulls_url":"https://api.github.com/repos/jtpereyda/PyCRC/pulls{/number}","milestones_url":"https://api.github.com/repos/jtpereyda/PyCRC/milestones{/number}","notifications_url":"https://api.github.com/repos/jtpereyda/PyCRC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jtpereyda/PyCRC/labels{/name}","releases_url":"https://api.github.com/repos/jtpereyda/PyCRC/releases{/id}","created_at":"2015-08-17T17:42:01Z","updated_at":"2015-08-17T17:42:02Z","pushed_at":"2015-08-17T18:09:16Z","git_url":"git://github.com/jtpereyda/PyCRC.git","ssh_url":"git@github.com:jtpereyda/PyCRC.git","clone_url":"https://github.com/jtpereyda/PyCRC.git","svn_url":"https://github.com/jtpereyda/PyCRC","homepage":null,"size":127,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"cristianav:master","ref":"master","sha":"02b91f44d17dec883f88f998e7847d60180070da","user":{"login":"cristianav","id":162268,"avatar_url":"https://avatars.githubusercontent.com/u/162268?v=3","gravatar_id":"","url":"https://api.github.com/users/cristianav","html_url":"https://github.com/cristianav","followers_url":"https://api.github.com/users/cristianav/followers","following_url":"https://api.github.com/users/cristianav/following{/other_user}","gists_url":"https://api.github.com/users/cristianav/gists{/gist_id}","starred_url":"https://api.github.com/users/cristianav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristianav/subscriptions","organizations_url":"https://api.github.com/users/cristianav/orgs","repos_url":"https://api.github.com/users/cristianav/repos","events_url":"https://api.github.com/users/cristianav/events{/privacy}","received_events_url":"https://api.github.com/users/cristianav/received_events","type":"User","site_admin":false},"repo":{"id":31919216,"name":"PyCRC","full_name":"cristianav/PyCRC","owner":{"login":"cristianav","id":162268,"avatar_url":"https://avatars.githubusercontent.com/u/162268?v=3","gravatar_id":"","url":"https://api.github.com/users/cristianav","html_url":"https://github.com/cristianav","followers_url":"https://api.github.com/users/cristianav/followers","following_url":"https://api.github.com/users/cristianav/following{/other_user}","gists_url":"https://api.github.com/users/cristianav/gists{/gist_id}","starred_url":"https://api.github.com/users/cristianav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristianav/subscriptions","organizations_url":"https://api.github.com/users/cristianav/orgs","repos_url":"https://api.github.com/users/cristianav/repos","events_url":"https://api.github.com/users/cristianav/events{/privacy}","received_events_url":"https://api.github.com/users/cristianav/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cristianav/PyCRC","description":"Python libraries for CRC calculations (it supports CRC-16, CRC-32, CRC-CCITT, etc)","fork":false,"url":"https://api.github.com/repos/cristianav/PyCRC","forks_url":"https://api.github.com/repos/cristianav/PyCRC/forks","keys_url":"https://api.github.com/repos/cristianav/PyCRC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cristianav/PyCRC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cristianav/PyCRC/teams","hooks_url":"https://api.github.com/repos/cristianav/PyCRC/hooks","issue_events_url":"https://api.github.com/repos/cristianav/PyCRC/issues/events{/number}","events_url":"https://api.github.com/repos/cristianav/PyCRC/events","assignees_url":"https://api.github.com/repos/cristianav/PyCRC/assignees{/user}","branches_url":"https://api.github.com/repos/cristianav/PyCRC/branches{/branch}","tags_url":"https://api.github.com/repos/cristianav/PyCRC/tags","blobs_url":"https://api.github.com/repos/cristianav/PyCRC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cristianav/PyCRC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cristianav/PyCRC/git/refs{/sha}","trees_url":"https://api.github.com/repos/cristianav/PyCRC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cristianav/PyCRC/statuses/{sha}","languages_url":"https://api.github.com/repos/cristianav/PyCRC/languages","stargazers_url":"https://api.github.com/repos/cristianav/PyCRC/stargazers","contributors_url":"https://api.github.com/repos/cristianav/PyCRC/contributors","subscribers_url":"https://api.github.com/repos/cristianav/PyCRC/subscribers","subscription_url":"https://api.github.com/repos/cristianav/PyCRC/subscription","commits_url":"https://api.github.com/repos/cristianav/PyCRC/commits{/sha}","git_commits_url":"https://api.github.com/repos/cristianav/PyCRC/git/commits{/sha}","comments_url":"https://api.github.com/repos/cristianav/PyCRC/comments{/number}","issue_comment_url":"https://api.github.com/repos/cristianav/PyCRC/issues/comments{/number}","contents_url":"https://api.github.com/repos/cristianav/PyCRC/contents/{+path}","compare_url":"https://api.github.com/repos/cristianav/PyCRC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cristianav/PyCRC/merges","archive_url":"https://api.github.com/repos/cristianav/PyCRC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cristianav/PyCRC/downloads","issues_url":"https://api.github.com/repos/cristianav/PyCRC/issues{/number}","pulls_url":"https://api.github.com/repos/cristianav/PyCRC/pulls{/number}","milestones_url":"https://api.github.com/repos/cristianav/PyCRC/milestones{/number}","notifications_url":"https://api.github.com/repos/cristianav/PyCRC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cristianav/PyCRC/labels{/name}","releases_url":"https://api.github.com/repos/cristianav/PyCRC/releases{/id}","created_at":"2015-03-09T19:51:09Z","updated_at":"2015-04-20T14:43:57Z","pushed_at":"2015-08-17T18:14:42Z","git_url":"git://github.com/cristianav/PyCRC.git","ssh_url":"git@github.com:cristianav/PyCRC.git","clone_url":"https://github.com/cristianav/PyCRC.git","svn_url":"https://github.com/cristianav/PyCRC","homepage":null,"size":196,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cristianav/PyCRC/pulls/2"},"html":{"href":"https://github.com/cristianav/PyCRC/pull/2"},"issue":{"href":"https://api.github.com/repos/cristianav/PyCRC/issues/2"},"comments":{"href":"https://api.github.com/repos/cristianav/PyCRC/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/cristianav/PyCRC/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/cristianav/PyCRC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cristianav/PyCRC/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/cristianav/PyCRC/statuses/a8883a617dc3c63d8a6881fb76a589d47e8efcfc"}}}}