{"action":"created","comment":{"url":"https://api.github.com/repos/bokeh/bokeh/pulls/comments/27663084","id":27663084,"diff_hunk":"@@ -11,20 +11,21 @@\n \n \n def source(**kwargs):\n-  kwargs['transform'] = {'resample':'heatmap',\n-                         'global_x_range' : [0, 10],\n-                         'global_y_range' : [0, 10],\n-                         'global_offset_x' : [0],\n-                         'global_offset_y' : [0],\n-                         'type' : 'ndarray'\n-\n-  }\n-  kwargs['data'] = {'x': [0],\n-                    'y': [0],\n-                    'dw' : [10],\n-                    'dh' : [10],\n-                   }\n-  return ServerDataSource(**kwargs)\n+    kwargs['transform'] = {'resample':'heatmap',\n+                           'global_x_range' : [0, 10],\n+                           'global_y_range' : [0, 10],\n+                           'global_offset_x' : [0],\n+                           'global_offset_y' : [0],\n+                           'type' : 'ndarray'","path":"bokeh/transforms/image_downsample.py","position":23,"original_position":23,"commit_id":"54b1056196d5446dd80ecac70fbc4bc1bcfe3d80","original_commit_id":"54b1056196d5446dd80ecac70fbc4bc1bcfe3d80","user":{"login":"bryevdv","id":1078448,"avatar_url":"https://avatars.githubusercontent.com/u/1078448?v=3","gravatar_id":"","url":"https://api.github.com/users/bryevdv","html_url":"https://github.com/bryevdv","followers_url":"https://api.github.com/users/bryevdv/followers","following_url":"https://api.github.com/users/bryevdv/following{/other_user}","gists_url":"https://api.github.com/users/bryevdv/gists{/gist_id}","starred_url":"https://api.github.com/users/bryevdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryevdv/subscriptions","organizations_url":"https://api.github.com/users/bryevdv/orgs","repos_url":"https://api.github.com/users/bryevdv/repos","events_url":"https://api.github.com/users/bryevdv/events{/privacy}","received_events_url":"https://api.github.com/users/bryevdv/received_events","type":"User","site_admin":false},"body":"Trailing comma recommended on last lines. FWIW I really hate the aligned brace style. I'd personally rather see\r\n```\r\nkwargs['transform'] = {\r\n    'resample':'heatmap',\r\n    'global_x_range' : [0, 10],\r\n    'global_y_range' : [0, 10],\r\n    'global_offset_x' : [0],\r\n    'global_offset_y' : [0],\r\n    'type' : 'ndarray',\r\n}\r\n```\r\nor\r\n```\r\nkwargs['transform'] = dict(\r\n    resample='heatmap',\r\n    global_x_range=[0, 10],\r\n    global_y_range=[0, 10],\r\n    global_offset_x=[0],\r\n    global_offset_y=[0],\r\n    type'='ndarray',\r\n)\r\n```","created_at":"2015-04-02T14:43:33Z","updated_at":"2015-04-02T14:43:33Z","html_url":"https://github.com/bokeh/bokeh/pull/2142#discussion_r27663084","pull_request_url":"https://api.github.com/repos/bokeh/bokeh/pulls/2142","_links":{"self":{"href":"https://api.github.com/repos/bokeh/bokeh/pulls/comments/27663084"},"html":{"href":"https://github.com/bokeh/bokeh/pull/2142#discussion_r27663084"},"pull_request":{"href":"https://api.github.com/repos/bokeh/bokeh/pulls/2142"}}},"pull_request":{"url":"https://api.github.com/repos/bokeh/bokeh/pulls/2142","id":32516218,"html_url":"https://github.com/bokeh/bokeh/pull/2142","diff_url":"https://github.com/bokeh/bokeh/pull/2142.diff","patch_url":"https://github.com/bokeh/bokeh/pull/2142.patch","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/2142","number":2142,"state":"open","locked":false,"title":"Flakified the remaining code","user":{"login":"almarklein","id":3015475,"avatar_url":"https://avatars.githubusercontent.com/u/3015475?v=3","gravatar_id":"","url":"https://api.github.com/users/almarklein","html_url":"https://github.com/almarklein","followers_url":"https://api.github.com/users/almarklein/followers","following_url":"https://api.github.com/users/almarklein/following{/other_user}","gists_url":"https://api.github.com/users/almarklein/gists{/gist_id}","starred_url":"https://api.github.com/users/almarklein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/almarklein/subscriptions","organizations_url":"https://api.github.com/users/almarklein/orgs","repos_url":"https://api.github.com/users/almarklein/repos","events_url":"https://api.github.com/users/almarklein/events{/privacy}","received_events_url":"https://api.github.com/users/almarklein/received_events","type":"User","site_admin":false},"body":"issues: #2078\r\n\r\nThis makes the whole bokeh codebase compliant with pyflakes. I increased the limit for long lines to 160 to avoid having to change many more lines.\r\n\r\nAlso, all files called `__init__.py` are not style-checked: many of these contain imports that are not used. Therefore its probably better to avoid putting actual code in any `__init__.py`.","created_at":"2015-04-02T14:28:48Z","updated_at":"2015-04-02T14:43:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a1ca087ed833ca67b37df440ae1dc788126c2d3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bokeh/bokeh/pulls/2142/commits","review_comments_url":"https://api.github.com/repos/bokeh/bokeh/pulls/2142/comments","review_comment_url":"https://api.github.com/repos/bokeh/bokeh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/2142/comments","statuses_url":"https://api.github.com/repos/bokeh/bokeh/statuses/54b1056196d5446dd80ecac70fbc4bc1bcfe3d80","head":{"label":"almarklein:flakify-all","ref":"flakify-all","sha":"54b1056196d5446dd80ecac70fbc4bc1bcfe3d80","user":{"login":"almarklein","id":3015475,"avatar_url":"https://avatars.githubusercontent.com/u/3015475?v=3","gravatar_id":"","url":"https://api.github.com/users/almarklein","html_url":"https://github.com/almarklein","followers_url":"https://api.github.com/users/almarklein/followers","following_url":"https://api.github.com/users/almarklein/following{/other_user}","gists_url":"https://api.github.com/users/almarklein/gists{/gist_id}","starred_url":"https://api.github.com/users/almarklein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/almarklein/subscriptions","organizations_url":"https://api.github.com/users/almarklein/orgs","repos_url":"https://api.github.com/users/almarklein/repos","events_url":"https://api.github.com/users/almarklein/events{/privacy}","received_events_url":"https://api.github.com/users/almarklein/received_events","type":"User","site_admin":false},"repo":{"id":30587961,"name":"bokeh","full_name":"almarklein/bokeh","owner":{"login":"almarklein","id":3015475,"avatar_url":"https://avatars.githubusercontent.com/u/3015475?v=3","gravatar_id":"","url":"https://api.github.com/users/almarklein","html_url":"https://github.com/almarklein","followers_url":"https://api.github.com/users/almarklein/followers","following_url":"https://api.github.com/users/almarklein/following{/other_user}","gists_url":"https://api.github.com/users/almarklein/gists{/gist_id}","starred_url":"https://api.github.com/users/almarklein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/almarklein/subscriptions","organizations_url":"https://api.github.com/users/almarklein/orgs","repos_url":"https://api.github.com/users/almarklein/repos","events_url":"https://api.github.com/users/almarklein/events{/privacy}","received_events_url":"https://api.github.com/users/almarklein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/almarklein/bokeh","description":"Interactive Web Plotting for Python","fork":true,"url":"https://api.github.com/repos/almarklein/bokeh","forks_url":"https://api.github.com/repos/almarklein/bokeh/forks","keys_url":"https://api.github.com/repos/almarklein/bokeh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/almarklein/bokeh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/almarklein/bokeh/teams","hooks_url":"https://api.github.com/repos/almarklein/bokeh/hooks","issue_events_url":"https://api.github.com/repos/almarklein/bokeh/issues/events{/number}","events_url":"https://api.github.com/repos/almarklein/bokeh/events","assignees_url":"https://api.github.com/repos/almarklein/bokeh/assignees{/user}","branches_url":"https://api.github.com/repos/almarklein/bokeh/branches{/branch}","tags_url":"https://api.github.com/repos/almarklein/bokeh/tags","blobs_url":"https://api.github.com/repos/almarklein/bokeh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/almarklein/bokeh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/almarklein/bokeh/git/refs{/sha}","trees_url":"https://api.github.com/repos/almarklein/bokeh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/almarklein/bokeh/statuses/{sha}","languages_url":"https://api.github.com/repos/almarklein/bokeh/languages","stargazers_url":"https://api.github.com/repos/almarklein/bokeh/stargazers","contributors_url":"https://api.github.com/repos/almarklein/bokeh/contributors","subscribers_url":"https://api.github.com/repos/almarklein/bokeh/subscribers","subscription_url":"https://api.github.com/repos/almarklein/bokeh/subscription","commits_url":"https://api.github.com/repos/almarklein/bokeh/commits{/sha}","git_commits_url":"https://api.github.com/repos/almarklein/bokeh/git/commits{/sha}","comments_url":"https://api.github.com/repos/almarklein/bokeh/comments{/number}","issue_comment_url":"https://api.github.com/repos/almarklein/bokeh/issues/comments{/number}","contents_url":"https://api.github.com/repos/almarklein/bokeh/contents/{+path}","compare_url":"https://api.github.com/repos/almarklein/bokeh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/almarklein/bokeh/merges","archive_url":"https://api.github.com/repos/almarklein/bokeh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/almarklein/bokeh/downloads","issues_url":"https://api.github.com/repos/almarklein/bokeh/issues{/number}","pulls_url":"https://api.github.com/repos/almarklein/bokeh/pulls{/number}","milestones_url":"https://api.github.com/repos/almarklein/bokeh/milestones{/number}","notifications_url":"https://api.github.com/repos/almarklein/bokeh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/almarklein/bokeh/labels{/name}","releases_url":"https://api.github.com/repos/almarklein/bokeh/releases{/id}","created_at":"2015-02-10T10:54:46Z","updated_at":"2015-02-10T10:54:49Z","pushed_at":"2015-04-02T14:24:24Z","git_url":"git://github.com/almarklein/bokeh.git","ssh_url":"git@github.com:almarklein/bokeh.git","clone_url":"https://github.com/almarklein/bokeh.git","svn_url":"https://github.com/almarklein/bokeh","homepage":"","size":113208,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bokeh:master","ref":"master","sha":"c63a78caa6293de1dde0286bbf9afed6a7e2b18d","user":{"login":"bokeh","id":8440965,"avatar_url":"https://avatars.githubusercontent.com/u/8440965?v=3","gravatar_id":"","url":"https://api.github.com/users/bokeh","html_url":"https://github.com/bokeh","followers_url":"https://api.github.com/users/bokeh/followers","following_url":"https://api.github.com/users/bokeh/following{/other_user}","gists_url":"https://api.github.com/users/bokeh/gists{/gist_id}","starred_url":"https://api.github.com/users/bokeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bokeh/subscriptions","organizations_url":"https://api.github.com/users/bokeh/orgs","repos_url":"https://api.github.com/users/bokeh/repos","events_url":"https://api.github.com/users/bokeh/events{/privacy}","received_events_url":"https://api.github.com/users/bokeh/received_events","type":"Organization","site_admin":false},"repo":{"id":3834332,"name":"bokeh","full_name":"bokeh/bokeh","owner":{"login":"bokeh","id":8440965,"avatar_url":"https://avatars.githubusercontent.com/u/8440965?v=3","gravatar_id":"","url":"https://api.github.com/users/bokeh","html_url":"https://github.com/bokeh","followers_url":"https://api.github.com/users/bokeh/followers","following_url":"https://api.github.com/users/bokeh/following{/other_user}","gists_url":"https://api.github.com/users/bokeh/gists{/gist_id}","starred_url":"https://api.github.com/users/bokeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bokeh/subscriptions","organizations_url":"https://api.github.com/users/bokeh/orgs","repos_url":"https://api.github.com/users/bokeh/repos","events_url":"https://api.github.com/users/bokeh/events{/privacy}","received_events_url":"https://api.github.com/users/bokeh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bokeh/bokeh","description":"Interactive Web Plotting for Python","fork":false,"url":"https://api.github.com/repos/bokeh/bokeh","forks_url":"https://api.github.com/repos/bokeh/bokeh/forks","keys_url":"https://api.github.com/repos/bokeh/bokeh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bokeh/bokeh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bokeh/bokeh/teams","hooks_url":"https://api.github.com/repos/bokeh/bokeh/hooks","issue_events_url":"https://api.github.com/repos/bokeh/bokeh/issues/events{/number}","events_url":"https://api.github.com/repos/bokeh/bokeh/events","assignees_url":"https://api.github.com/repos/bokeh/bokeh/assignees{/user}","branches_url":"https://api.github.com/repos/bokeh/bokeh/branches{/branch}","tags_url":"https://api.github.com/repos/bokeh/bokeh/tags","blobs_url":"https://api.github.com/repos/bokeh/bokeh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bokeh/bokeh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bokeh/bokeh/git/refs{/sha}","trees_url":"https://api.github.com/repos/bokeh/bokeh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bokeh/bokeh/statuses/{sha}","languages_url":"https://api.github.com/repos/bokeh/bokeh/languages","stargazers_url":"https://api.github.com/repos/bokeh/bokeh/stargazers","contributors_url":"https://api.github.com/repos/bokeh/bokeh/contributors","subscribers_url":"https://api.github.com/repos/bokeh/bokeh/subscribers","subscription_url":"https://api.github.com/repos/bokeh/bokeh/subscription","commits_url":"https://api.github.com/repos/bokeh/bokeh/commits{/sha}","git_commits_url":"https://api.github.com/repos/bokeh/bokeh/git/commits{/sha}","comments_url":"https://api.github.com/repos/bokeh/bokeh/comments{/number}","issue_comment_url":"https://api.github.com/repos/bokeh/bokeh/issues/comments{/number}","contents_url":"https://api.github.com/repos/bokeh/bokeh/contents/{+path}","compare_url":"https://api.github.com/repos/bokeh/bokeh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bokeh/bokeh/merges","archive_url":"https://api.github.com/repos/bokeh/bokeh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bokeh/bokeh/downloads","issues_url":"https://api.github.com/repos/bokeh/bokeh/issues{/number}","pulls_url":"https://api.github.com/repos/bokeh/bokeh/pulls{/number}","milestones_url":"https://api.github.com/repos/bokeh/bokeh/milestones{/number}","notifications_url":"https://api.github.com/repos/bokeh/bokeh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bokeh/bokeh/labels{/name}","releases_url":"https://api.github.com/repos/bokeh/bokeh/releases{/id}","created_at":"2012-03-26T15:40:01Z","updated_at":"2015-04-02T14:03:54Z","pushed_at":"2015-04-02T14:28:49Z","git_url":"git://github.com/bokeh/bokeh.git","ssh_url":"git@github.com:bokeh/bokeh.git","clone_url":"https://github.com/bokeh/bokeh.git","svn_url":"https://github.com/bokeh/bokeh","homepage":"","size":151454,"stargazers_count":2566,"watchers_count":2566,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":407,"mirror_url":null,"open_issues_count":374,"forks":407,"open_issues":374,"watchers":2566,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bokeh/bokeh/pulls/2142"},"html":{"href":"https://github.com/bokeh/bokeh/pull/2142"},"issue":{"href":"https://api.github.com/repos/bokeh/bokeh/issues/2142"},"comments":{"href":"https://api.github.com/repos/bokeh/bokeh/issues/2142/comments"},"review_comments":{"href":"https://api.github.com/repos/bokeh/bokeh/pulls/2142/comments"},"review_comment":{"href":"https://api.github.com/repos/bokeh/bokeh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bokeh/bokeh/pulls/2142/commits"},"statuses":{"href":"https://api.github.com/repos/bokeh/bokeh/statuses/54b1056196d5446dd80ecac70fbc4bc1bcfe3d80"}}}}