{"action":"created","comment":{"url":"https://api.github.com/repos/TailorDev/Watson/pulls/comments/59566958","id":59566958,"diff_hunk":"@@ -60,6 +62,42 @@ def getboolean(self, section, option, default=False):\n         val = self.get(section, option)\n         return val.lower() in ('1', 'on', 'true', 'yes') if val else default\n \n+    def getlist(self, section, option, default=None):\n+        \"\"\"\n+        Return value of option in given section as a list of strings.\n+\n+        If option is not set, return default (defaults to an empty list).\n+\n+        The option value is split into list tokens using one of two strategies:\n+\n+        * If the value contains any newlines, i.e. it was written in the\n+          configuration file using continuation lines, the value is split at\n+          newlines and empty items are discarded.","path":"watson/config.py","position":23,"original_position":23,"commit_id":"b7f5216d80dcbabc846139199736c93d4f1468ae","original_commit_id":"c8ddb13d667e129fe46ae3059604449ceb3680e4","user":{"login":"SpotlightKid","id":5719151,"avatar_url":"https://avatars.githubusercontent.com/u/5719151?v=3","gravatar_id":"","url":"https://api.github.com/users/SpotlightKid","html_url":"https://github.com/SpotlightKid","followers_url":"https://api.github.com/users/SpotlightKid/followers","following_url":"https://api.github.com/users/SpotlightKid/following{/other_user}","gists_url":"https://api.github.com/users/SpotlightKid/gists{/gist_id}","starred_url":"https://api.github.com/users/SpotlightKid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpotlightKid/subscriptions","organizations_url":"https://api.github.com/users/SpotlightKid/orgs","repos_url":"https://api.github.com/users/SpotlightKid/repos","events_url":"https://api.github.com/users/SpotlightKid/events{/privacy}","received_events_url":"https://api.github.com/users/SpotlightKid/received_events","type":"User","site_admin":false},"body":"The test already covers that with `value1` in the test config, where the first option line is empty. But I will add another empty line on its own, to demonstrate that this works too.","created_at":"2016-04-13T15:15:35Z","updated_at":"2016-04-13T15:15:35Z","html_url":"https://github.com/TailorDev/Watson/pull/114#discussion_r59566958","pull_request_url":"https://api.github.com/repos/TailorDev/Watson/pulls/114","_links":{"self":{"href":"https://api.github.com/repos/TailorDev/Watson/pulls/comments/59566958"},"html":{"href":"https://github.com/TailorDev/Watson/pull/114#discussion_r59566958"},"pull_request":{"href":"https://api.github.com/repos/TailorDev/Watson/pulls/114"}}},"pull_request":{"url":"https://api.github.com/repos/TailorDev/Watson/pulls/114","id":66333805,"html_url":"https://github.com/TailorDev/Watson/pull/114","diff_url":"https://github.com/TailorDev/Watson/pull/114.diff","patch_url":"https://github.com/TailorDev/Watson/pull/114.patch","issue_url":"https://api.github.com/repos/TailorDev/Watson/issues/114","number":114,"state":"open","locked":false,"title":"Add new method 'getlist' to 'ConfigParser'","user":{"login":"SpotlightKid","id":5719151,"avatar_url":"https://avatars.githubusercontent.com/u/5719151?v=3","gravatar_id":"","url":"https://api.github.com/users/SpotlightKid","html_url":"https://github.com/SpotlightKid","followers_url":"https://api.github.com/users/SpotlightKid/followers","following_url":"https://api.github.com/users/SpotlightKid/following{/other_user}","gists_url":"https://api.github.com/users/SpotlightKid/gists{/gist_id}","starred_url":"https://api.github.com/users/SpotlightKid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpotlightKid/subscriptions","organizations_url":"https://api.github.com/users/SpotlightKid/orgs","repos_url":"https://api.github.com/users/SpotlightKid/repos","events_url":"https://api.github.com/users/SpotlightKid/events{/privacy}","received_events_url":"https://api.github.com/users/SpotlightKid/received_events","type":"User","site_admin":false},"body":"This allows to get a configuration value as a list of strings.\r\n\r\nFor now this mainly to support PR #113, but could be used by future new features as well.\r\n\r\nHere's a copy of the included docstring:\r\n\r\n```\r\nReturn value of option in given section as a list of strings.\r\n\r\nIf option is not set, return default (defaults to an empty list).\r\n\r\nThe option value is split into list tokens using one of two strategies:\r\n\r\n* If the value contains any newlines, i.e. it was written in the\r\n  configuration file using continuation lines, the value is split at\r\n  newlines and empty items are discarded.\r\n* Otherwise, the value is split according to unix shell parsing rules.\r\n  Items are separated by whitespace, but items can be enclosed in \r\n  single or double quotes to preserve spaces in them.\r\n  \r\nExample::\r\n\r\n    [test]\r\n    option2 =\r\n        one\r\n        two three\r\n        four\r\n        sive six\r\n    option1 = one  \"two three\" four 'five  six'\r\n```","created_at":"2016-04-13T14:46:44Z","updated_at":"2016-04-13T15:15:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"768dc8309224d09e2287316c9e5a36fba4b0e539","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TailorDev/Watson/pulls/114/commits","review_comments_url":"https://api.github.com/repos/TailorDev/Watson/pulls/114/comments","review_comment_url":"https://api.github.com/repos/TailorDev/Watson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TailorDev/Watson/issues/114/comments","statuses_url":"https://api.github.com/repos/TailorDev/Watson/statuses/b7f5216d80dcbabc846139199736c93d4f1468ae","head":{"label":"SpotlightKid:feature/configlist","ref":"feature/configlist","sha":"b7f5216d80dcbabc846139199736c93d4f1468ae","user":{"login":"SpotlightKid","id":5719151,"avatar_url":"https://avatars.githubusercontent.com/u/5719151?v=3","gravatar_id":"","url":"https://api.github.com/users/SpotlightKid","html_url":"https://github.com/SpotlightKid","followers_url":"https://api.github.com/users/SpotlightKid/followers","following_url":"https://api.github.com/users/SpotlightKid/following{/other_user}","gists_url":"https://api.github.com/users/SpotlightKid/gists{/gist_id}","starred_url":"https://api.github.com/users/SpotlightKid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpotlightKid/subscriptions","organizations_url":"https://api.github.com/users/SpotlightKid/orgs","repos_url":"https://api.github.com/users/SpotlightKid/repos","events_url":"https://api.github.com/users/SpotlightKid/events{/privacy}","received_events_url":"https://api.github.com/users/SpotlightKid/received_events","type":"User","site_admin":false},"repo":{"id":44525740,"name":"Watson","full_name":"SpotlightKid/Watson","owner":{"login":"SpotlightKid","id":5719151,"avatar_url":"https://avatars.githubusercontent.com/u/5719151?v=3","gravatar_id":"","url":"https://api.github.com/users/SpotlightKid","html_url":"https://github.com/SpotlightKid","followers_url":"https://api.github.com/users/SpotlightKid/followers","following_url":"https://api.github.com/users/SpotlightKid/following{/other_user}","gists_url":"https://api.github.com/users/SpotlightKid/gists{/gist_id}","starred_url":"https://api.github.com/users/SpotlightKid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpotlightKid/subscriptions","organizations_url":"https://api.github.com/users/SpotlightKid/orgs","repos_url":"https://api.github.com/users/SpotlightKid/repos","events_url":"https://api.github.com/users/SpotlightKid/events{/privacy}","received_events_url":"https://api.github.com/users/SpotlightKid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SpotlightKid/Watson","description":":watch: A wonderful CLI to track your time!","fork":true,"url":"https://api.github.com/repos/SpotlightKid/Watson","forks_url":"https://api.github.com/repos/SpotlightKid/Watson/forks","keys_url":"https://api.github.com/repos/SpotlightKid/Watson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpotlightKid/Watson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpotlightKid/Watson/teams","hooks_url":"https://api.github.com/repos/SpotlightKid/Watson/hooks","issue_events_url":"https://api.github.com/repos/SpotlightKid/Watson/issues/events{/number}","events_url":"https://api.github.com/repos/SpotlightKid/Watson/events","assignees_url":"https://api.github.com/repos/SpotlightKid/Watson/assignees{/user}","branches_url":"https://api.github.com/repos/SpotlightKid/Watson/branches{/branch}","tags_url":"https://api.github.com/repos/SpotlightKid/Watson/tags","blobs_url":"https://api.github.com/repos/SpotlightKid/Watson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpotlightKid/Watson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpotlightKid/Watson/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpotlightKid/Watson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpotlightKid/Watson/statuses/{sha}","languages_url":"https://api.github.com/repos/SpotlightKid/Watson/languages","stargazers_url":"https://api.github.com/repos/SpotlightKid/Watson/stargazers","contributors_url":"https://api.github.com/repos/SpotlightKid/Watson/contributors","subscribers_url":"https://api.github.com/repos/SpotlightKid/Watson/subscribers","subscription_url":"https://api.github.com/repos/SpotlightKid/Watson/subscription","commits_url":"https://api.github.com/repos/SpotlightKid/Watson/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpotlightKid/Watson/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpotlightKid/Watson/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpotlightKid/Watson/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpotlightKid/Watson/contents/{+path}","compare_url":"https://api.github.com/repos/SpotlightKid/Watson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpotlightKid/Watson/merges","archive_url":"https://api.github.com/repos/SpotlightKid/Watson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpotlightKid/Watson/downloads","issues_url":"https://api.github.com/repos/SpotlightKid/Watson/issues{/number}","pulls_url":"https://api.github.com/repos/SpotlightKid/Watson/pulls{/number}","milestones_url":"https://api.github.com/repos/SpotlightKid/Watson/milestones{/number}","notifications_url":"https://api.github.com/repos/SpotlightKid/Watson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpotlightKid/Watson/labels{/name}","releases_url":"https://api.github.com/repos/SpotlightKid/Watson/releases{/id}","deployments_url":"https://api.github.com/repos/SpotlightKid/Watson/deployments","created_at":"2015-10-19T09:53:55Z","updated_at":"2015-11-11T19:28:03Z","pushed_at":"2016-04-13T15:11:14Z","git_url":"git://github.com/SpotlightKid/Watson.git","ssh_url":"git@github.com:SpotlightKid/Watson.git","clone_url":"https://github.com/SpotlightKid/Watson.git","svn_url":"https://github.com/SpotlightKid/Watson","homepage":"","size":8901,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"TailorDev:master","ref":"master","sha":"bf04fb9e58422abc62744a926278325d55c0955b","user":{"login":"TailorDev","id":11196253,"avatar_url":"https://avatars.githubusercontent.com/u/11196253?v=3","gravatar_id":"","url":"https://api.github.com/users/TailorDev","html_url":"https://github.com/TailorDev","followers_url":"https://api.github.com/users/TailorDev/followers","following_url":"https://api.github.com/users/TailorDev/following{/other_user}","gists_url":"https://api.github.com/users/TailorDev/gists{/gist_id}","starred_url":"https://api.github.com/users/TailorDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TailorDev/subscriptions","organizations_url":"https://api.github.com/users/TailorDev/orgs","repos_url":"https://api.github.com/users/TailorDev/repos","events_url":"https://api.github.com/users/TailorDev/events{/privacy}","received_events_url":"https://api.github.com/users/TailorDev/received_events","type":"Organization","site_admin":false},"repo":{"id":32409676,"name":"Watson","full_name":"TailorDev/Watson","owner":{"login":"TailorDev","id":11196253,"avatar_url":"https://avatars.githubusercontent.com/u/11196253?v=3","gravatar_id":"","url":"https://api.github.com/users/TailorDev","html_url":"https://github.com/TailorDev","followers_url":"https://api.github.com/users/TailorDev/followers","following_url":"https://api.github.com/users/TailorDev/following{/other_user}","gists_url":"https://api.github.com/users/TailorDev/gists{/gist_id}","starred_url":"https://api.github.com/users/TailorDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TailorDev/subscriptions","organizations_url":"https://api.github.com/users/TailorDev/orgs","repos_url":"https://api.github.com/users/TailorDev/repos","events_url":"https://api.github.com/users/TailorDev/events{/privacy}","received_events_url":"https://api.github.com/users/TailorDev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TailorDev/Watson","description":":watch: A wonderful CLI to track your time!","fork":false,"url":"https://api.github.com/repos/TailorDev/Watson","forks_url":"https://api.github.com/repos/TailorDev/Watson/forks","keys_url":"https://api.github.com/repos/TailorDev/Watson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TailorDev/Watson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TailorDev/Watson/teams","hooks_url":"https://api.github.com/repos/TailorDev/Watson/hooks","issue_events_url":"https://api.github.com/repos/TailorDev/Watson/issues/events{/number}","events_url":"https://api.github.com/repos/TailorDev/Watson/events","assignees_url":"https://api.github.com/repos/TailorDev/Watson/assignees{/user}","branches_url":"https://api.github.com/repos/TailorDev/Watson/branches{/branch}","tags_url":"https://api.github.com/repos/TailorDev/Watson/tags","blobs_url":"https://api.github.com/repos/TailorDev/Watson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TailorDev/Watson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TailorDev/Watson/git/refs{/sha}","trees_url":"https://api.github.com/repos/TailorDev/Watson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TailorDev/Watson/statuses/{sha}","languages_url":"https://api.github.com/repos/TailorDev/Watson/languages","stargazers_url":"https://api.github.com/repos/TailorDev/Watson/stargazers","contributors_url":"https://api.github.com/repos/TailorDev/Watson/contributors","subscribers_url":"https://api.github.com/repos/TailorDev/Watson/subscribers","subscription_url":"https://api.github.com/repos/TailorDev/Watson/subscription","commits_url":"https://api.github.com/repos/TailorDev/Watson/commits{/sha}","git_commits_url":"https://api.github.com/repos/TailorDev/Watson/git/commits{/sha}","comments_url":"https://api.github.com/repos/TailorDev/Watson/comments{/number}","issue_comment_url":"https://api.github.com/repos/TailorDev/Watson/issues/comments{/number}","contents_url":"https://api.github.com/repos/TailorDev/Watson/contents/{+path}","compare_url":"https://api.github.com/repos/TailorDev/Watson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TailorDev/Watson/merges","archive_url":"https://api.github.com/repos/TailorDev/Watson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TailorDev/Watson/downloads","issues_url":"https://api.github.com/repos/TailorDev/Watson/issues{/number}","pulls_url":"https://api.github.com/repos/TailorDev/Watson/pulls{/number}","milestones_url":"https://api.github.com/repos/TailorDev/Watson/milestones{/number}","notifications_url":"https://api.github.com/repos/TailorDev/Watson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TailorDev/Watson/labels{/name}","releases_url":"https://api.github.com/repos/TailorDev/Watson/releases{/id}","deployments_url":"https://api.github.com/repos/TailorDev/Watson/deployments","created_at":"2015-03-17T17:38:52Z","updated_at":"2016-04-13T01:39:12Z","pushed_at":"2016-04-13T15:11:14Z","git_url":"git://github.com/TailorDev/Watson.git","ssh_url":"git@github.com:TailorDev/Watson.git","clone_url":"https://github.com/TailorDev/Watson.git","svn_url":"https://github.com/TailorDev/Watson","homepage":"http://tailordev.github.io/Watson/","size":9338,"stargazers_count":409,"watchers_count":409,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":28,"forks":29,"open_issues":28,"watchers":409,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TailorDev/Watson/pulls/114"},"html":{"href":"https://github.com/TailorDev/Watson/pull/114"},"issue":{"href":"https://api.github.com/repos/TailorDev/Watson/issues/114"},"comments":{"href":"https://api.github.com/repos/TailorDev/Watson/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/TailorDev/Watson/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/TailorDev/Watson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TailorDev/Watson/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/TailorDev/Watson/statuses/b7f5216d80dcbabc846139199736c93d4f1468ae"}}}}