{"action":"created","comment":{"url":"https://api.github.com/repos/AIFDR/inasafe/pulls/comments/24457100","id":24457100,"diff_hunk":"@@ -236,27 +237,36 @@ def build_widget(self, form_layout, name, key_value):\n         hide_label = False\n \n         if isinstance(key_value, list):\n+            def function(z):\n+                \"\"\"\n+                :param z: the values to be cast as csv\n+                :return: list of value types\n+                \"\"\"\n+                value_type = type(key_value[0])\n+                return [value_type(y) for y in str(z).split(',')]\n             widget = QLineEdit()\n             value = ', '.join([str(x) for x in key_value])\n             # NOTE: we assume that all element in list have same type\n-            value_type = type(key_value[0])\n-            function = lambda z: [value_type(y) for y in str(z).split(',')]\n         elif isinstance(key_value, dict):\n+            def function(z):","path":"safe/impact_statistics/function_options_dialog.py","position":27,"original_position":27,"commit_id":"723d44740e2df02cbc625f0f8307e7f043f48b87","original_commit_id":"723d44740e2df02cbc625f0f8307e7f043f48b87","user":{"login":"timlinux","id":178003,"avatar_url":"https://avatars.githubusercontent.com/u/178003?v=3","gravatar_id":"","url":"https://api.github.com/users/timlinux","html_url":"https://github.com/timlinux","followers_url":"https://api.github.com/users/timlinux/followers","following_url":"https://api.github.com/users/timlinux/following{/other_user}","gists_url":"https://api.github.com/users/timlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/timlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timlinux/subscriptions","organizations_url":"https://api.github.com/users/timlinux/orgs","repos_url":"https://api.github.com/users/timlinux/repos","events_url":"https://api.github.com/users/timlinux/events{/privacy}","received_events_url":"https://api.github.com/users/timlinux/received_events","type":"User","site_admin":false},"body":"See comments above on parameter naming.","created_at":"2015-02-10T22:24:39Z","updated_at":"2015-02-10T22:24:39Z","html_url":"https://github.com/AIFDR/inasafe/pull/1629#discussion_r24457100","pull_request_url":"https://api.github.com/repos/AIFDR/inasafe/pulls/1629","_links":{"self":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/comments/24457100"},"html":{"href":"https://github.com/AIFDR/inasafe/pull/1629#discussion_r24457100"},"pull_request":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/1629"}}},"pull_request":{"url":"https://api.github.com/repos/AIFDR/inasafe/pulls/1629","id":28994150,"html_url":"https://github.com/AIFDR/inasafe/pull/1629","diff_url":"https://github.com/AIFDR/inasafe/pull/1629.diff","patch_url":"https://github.com/AIFDR/inasafe/pull/1629.patch","issue_url":"https://api.github.com/repos/AIFDR/inasafe/issues/1629","number":1629,"state":"open","locked":false,"title":"Issue #1621. Fix pep8 use conventional function definition rather than l...","user":{"login":"cchristelis","id":2319504,"avatar_url":"https://avatars.githubusercontent.com/u/2319504?v=3","gravatar_id":"","url":"https://api.github.com/users/cchristelis","html_url":"https://github.com/cchristelis","followers_url":"https://api.github.com/users/cchristelis/followers","following_url":"https://api.github.com/users/cchristelis/following{/other_user}","gists_url":"https://api.github.com/users/cchristelis/gists{/gist_id}","starred_url":"https://api.github.com/users/cchristelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchristelis/subscriptions","organizations_url":"https://api.github.com/users/cchristelis/orgs","repos_url":"https://api.github.com/users/cchristelis/repos","events_url":"https://api.github.com/users/cchristelis/events{/privacy}","received_events_url":"https://api.github.com/users/cchristelis/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-10T10:07:22Z","updated_at":"2015-02-10T22:24:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f46c64e691482efd621aef115ef6ba59524efb79","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AIFDR/inasafe/pulls/1629/commits","review_comments_url":"https://api.github.com/repos/AIFDR/inasafe/pulls/1629/comments","review_comment_url":"https://api.github.com/repos/AIFDR/inasafe/pulls/comments/{number}","comments_url":"https://api.github.com/repos/AIFDR/inasafe/issues/1629/comments","statuses_url":"https://api.github.com/repos/AIFDR/inasafe/statuses/723d44740e2df02cbc625f0f8307e7f043f48b87","head":{"label":"cchristelis:develop","ref":"develop","sha":"723d44740e2df02cbc625f0f8307e7f043f48b87","user":{"login":"cchristelis","id":2319504,"avatar_url":"https://avatars.githubusercontent.com/u/2319504?v=3","gravatar_id":"","url":"https://api.github.com/users/cchristelis","html_url":"https://github.com/cchristelis","followers_url":"https://api.github.com/users/cchristelis/followers","following_url":"https://api.github.com/users/cchristelis/following{/other_user}","gists_url":"https://api.github.com/users/cchristelis/gists{/gist_id}","starred_url":"https://api.github.com/users/cchristelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchristelis/subscriptions","organizations_url":"https://api.github.com/users/cchristelis/orgs","repos_url":"https://api.github.com/users/cchristelis/repos","events_url":"https://api.github.com/users/cchristelis/events{/privacy}","received_events_url":"https://api.github.com/users/cchristelis/received_events","type":"User","site_admin":false},"repo":{"id":20913065,"name":"inasafe","full_name":"cchristelis/inasafe","owner":{"login":"cchristelis","id":2319504,"avatar_url":"https://avatars.githubusercontent.com/u/2319504?v=3","gravatar_id":"","url":"https://api.github.com/users/cchristelis","html_url":"https://github.com/cchristelis","followers_url":"https://api.github.com/users/cchristelis/followers","following_url":"https://api.github.com/users/cchristelis/following{/other_user}","gists_url":"https://api.github.com/users/cchristelis/gists{/gist_id}","starred_url":"https://api.github.com/users/cchristelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchristelis/subscriptions","organizations_url":"https://api.github.com/users/cchristelis/orgs","repos_url":"https://api.github.com/users/cchristelis/repos","events_url":"https://api.github.com/users/cchristelis/events{/privacy}","received_events_url":"https://api.github.com/users/cchristelis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cchristelis/inasafe","description":"InaSAFE - QGIS plugin for estimating impact from natural disasters","fork":true,"url":"https://api.github.com/repos/cchristelis/inasafe","forks_url":"https://api.github.com/repos/cchristelis/inasafe/forks","keys_url":"https://api.github.com/repos/cchristelis/inasafe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cchristelis/inasafe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cchristelis/inasafe/teams","hooks_url":"https://api.github.com/repos/cchristelis/inasafe/hooks","issue_events_url":"https://api.github.com/repos/cchristelis/inasafe/issues/events{/number}","events_url":"https://api.github.com/repos/cchristelis/inasafe/events","assignees_url":"https://api.github.com/repos/cchristelis/inasafe/assignees{/user}","branches_url":"https://api.github.com/repos/cchristelis/inasafe/branches{/branch}","tags_url":"https://api.github.com/repos/cchristelis/inasafe/tags","blobs_url":"https://api.github.com/repos/cchristelis/inasafe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cchristelis/inasafe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cchristelis/inasafe/git/refs{/sha}","trees_url":"https://api.github.com/repos/cchristelis/inasafe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cchristelis/inasafe/statuses/{sha}","languages_url":"https://api.github.com/repos/cchristelis/inasafe/languages","stargazers_url":"https://api.github.com/repos/cchristelis/inasafe/stargazers","contributors_url":"https://api.github.com/repos/cchristelis/inasafe/contributors","subscribers_url":"https://api.github.com/repos/cchristelis/inasafe/subscribers","subscription_url":"https://api.github.com/repos/cchristelis/inasafe/subscription","commits_url":"https://api.github.com/repos/cchristelis/inasafe/commits{/sha}","git_commits_url":"https://api.github.com/repos/cchristelis/inasafe/git/commits{/sha}","comments_url":"https://api.github.com/repos/cchristelis/inasafe/comments{/number}","issue_comment_url":"https://api.github.com/repos/cchristelis/inasafe/issues/comments/{number}","contents_url":"https://api.github.com/repos/cchristelis/inasafe/contents/{+path}","compare_url":"https://api.github.com/repos/cchristelis/inasafe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cchristelis/inasafe/merges","archive_url":"https://api.github.com/repos/cchristelis/inasafe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cchristelis/inasafe/downloads","issues_url":"https://api.github.com/repos/cchristelis/inasafe/issues{/number}","pulls_url":"https://api.github.com/repos/cchristelis/inasafe/pulls{/number}","milestones_url":"https://api.github.com/repos/cchristelis/inasafe/milestones{/number}","notifications_url":"https://api.github.com/repos/cchristelis/inasafe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cchristelis/inasafe/labels{/name}","releases_url":"https://api.github.com/repos/cchristelis/inasafe/releases{/id}","created_at":"2014-06-17T06:45:14Z","updated_at":"2015-02-10T09:02:02Z","pushed_at":"2015-02-10T09:02:00Z","git_url":"git://github.com/cchristelis/inasafe.git","ssh_url":"git@github.com:cchristelis/inasafe.git","clone_url":"https://github.com/cchristelis/inasafe.git","svn_url":"https://github.com/cchristelis/inasafe","homepage":"www.inasafe.org","size":128680,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"AIFDR:develop","ref":"develop","sha":"6f51e9811f882a725d085a5dea1415be8ba336fb","user":{"login":"AIFDR","id":582004,"avatar_url":"https://avatars.githubusercontent.com/u/582004?v=3","gravatar_id":"","url":"https://api.github.com/users/AIFDR","html_url":"https://github.com/AIFDR","followers_url":"https://api.github.com/users/AIFDR/followers","following_url":"https://api.github.com/users/AIFDR/following{/other_user}","gists_url":"https://api.github.com/users/AIFDR/gists{/gist_id}","starred_url":"https://api.github.com/users/AIFDR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AIFDR/subscriptions","organizations_url":"https://api.github.com/users/AIFDR/orgs","repos_url":"https://api.github.com/users/AIFDR/repos","events_url":"https://api.github.com/users/AIFDR/events{/privacy}","received_events_url":"https://api.github.com/users/AIFDR/received_events","type":"Organization","site_admin":false},"repo":{"id":3135721,"name":"inasafe","full_name":"AIFDR/inasafe","owner":{"login":"AIFDR","id":582004,"avatar_url":"https://avatars.githubusercontent.com/u/582004?v=3","gravatar_id":"","url":"https://api.github.com/users/AIFDR","html_url":"https://github.com/AIFDR","followers_url":"https://api.github.com/users/AIFDR/followers","following_url":"https://api.github.com/users/AIFDR/following{/other_user}","gists_url":"https://api.github.com/users/AIFDR/gists{/gist_id}","starred_url":"https://api.github.com/users/AIFDR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AIFDR/subscriptions","organizations_url":"https://api.github.com/users/AIFDR/orgs","repos_url":"https://api.github.com/users/AIFDR/repos","events_url":"https://api.github.com/users/AIFDR/events{/privacy}","received_events_url":"https://api.github.com/users/AIFDR/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AIFDR/inasafe","description":"InaSAFE - QGIS plugin for estimating impact from natural disasters","fork":false,"url":"https://api.github.com/repos/AIFDR/inasafe","forks_url":"https://api.github.com/repos/AIFDR/inasafe/forks","keys_url":"https://api.github.com/repos/AIFDR/inasafe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AIFDR/inasafe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AIFDR/inasafe/teams","hooks_url":"https://api.github.com/repos/AIFDR/inasafe/hooks","issue_events_url":"https://api.github.com/repos/AIFDR/inasafe/issues/events{/number}","events_url":"https://api.github.com/repos/AIFDR/inasafe/events","assignees_url":"https://api.github.com/repos/AIFDR/inasafe/assignees{/user}","branches_url":"https://api.github.com/repos/AIFDR/inasafe/branches{/branch}","tags_url":"https://api.github.com/repos/AIFDR/inasafe/tags","blobs_url":"https://api.github.com/repos/AIFDR/inasafe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AIFDR/inasafe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AIFDR/inasafe/git/refs{/sha}","trees_url":"https://api.github.com/repos/AIFDR/inasafe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AIFDR/inasafe/statuses/{sha}","languages_url":"https://api.github.com/repos/AIFDR/inasafe/languages","stargazers_url":"https://api.github.com/repos/AIFDR/inasafe/stargazers","contributors_url":"https://api.github.com/repos/AIFDR/inasafe/contributors","subscribers_url":"https://api.github.com/repos/AIFDR/inasafe/subscribers","subscription_url":"https://api.github.com/repos/AIFDR/inasafe/subscription","commits_url":"https://api.github.com/repos/AIFDR/inasafe/commits{/sha}","git_commits_url":"https://api.github.com/repos/AIFDR/inasafe/git/commits{/sha}","comments_url":"https://api.github.com/repos/AIFDR/inasafe/comments{/number}","issue_comment_url":"https://api.github.com/repos/AIFDR/inasafe/issues/comments/{number}","contents_url":"https://api.github.com/repos/AIFDR/inasafe/contents/{+path}","compare_url":"https://api.github.com/repos/AIFDR/inasafe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AIFDR/inasafe/merges","archive_url":"https://api.github.com/repos/AIFDR/inasafe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AIFDR/inasafe/downloads","issues_url":"https://api.github.com/repos/AIFDR/inasafe/issues{/number}","pulls_url":"https://api.github.com/repos/AIFDR/inasafe/pulls{/number}","milestones_url":"https://api.github.com/repos/AIFDR/inasafe/milestones{/number}","notifications_url":"https://api.github.com/repos/AIFDR/inasafe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AIFDR/inasafe/labels{/name}","releases_url":"https://api.github.com/repos/AIFDR/inasafe/releases{/id}","created_at":"2012-01-09T10:34:29Z","updated_at":"2015-02-09T07:23:43Z","pushed_at":"2015-02-09T07:23:41Z","git_url":"git://github.com/AIFDR/inasafe.git","ssh_url":"git@github.com:AIFDR/inasafe.git","clone_url":"https://github.com/AIFDR/inasafe.git","svn_url":"https://github.com/AIFDR/inasafe","homepage":"www.inasafe.org","size":147786,"stargazers_count":65,"watchers_count":65,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":228,"forks":61,"open_issues":228,"watchers":65,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/1629"},"html":{"href":"https://github.com/AIFDR/inasafe/pull/1629"},"issue":{"href":"https://api.github.com/repos/AIFDR/inasafe/issues/1629"},"comments":{"href":"https://api.github.com/repos/AIFDR/inasafe/issues/1629/comments"},"review_comments":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/1629/comments"},"review_comment":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/1629/commits"},"statuses":{"href":"https://api.github.com/repos/AIFDR/inasafe/statuses/723d44740e2df02cbc625f0f8307e7f043f48b87"}}}}