{"action":"created","comment":{"url":"https://api.github.com/repos/ultrabug/py3status/pulls/comments/84501551","pull_request_review_id":5277983,"id":84501551,"diff_hunk":"@@ -0,0 +1,109 @@\n+from py3status.composite import Composite\n+\n+\n+# Composite initialize\n+\n+def test_Composite_init_1():\n+    result = Composite('moo').get_content()\n+    assert(","path":"tests/test_composite.py","position":8,"original_position":8,"commit_id":"be7e21f7b9bc53aceda8bd08c8f59a4af69f6ff1","original_commit_id":"be7e21f7b9bc53aceda8bd08c8f59a4af69f6ff1","user":{"login":"tobes","id":56311,"avatar_url":"https://avatars.githubusercontent.com/u/56311?v=3","gravatar_id":"","url":"https://api.github.com/users/tobes","html_url":"https://github.com/tobes","followers_url":"https://api.github.com/users/tobes/followers","following_url":"https://api.github.com/users/tobes/following{/other_user}","gists_url":"https://api.github.com/users/tobes/gists{/gist_id}","starred_url":"https://api.github.com/users/tobes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobes/subscriptions","organizations_url":"https://api.github.com/users/tobes/orgs","repos_url":"https://api.github.com/users/tobes/repos","events_url":"https://api.github.com/users/tobes/events{/privacy}","received_events_url":"https://api.github.com/users/tobes/received_events","type":"User","site_admin":false},"body":"Sometimes I forget","created_at":"2016-10-21T15:23:10Z","updated_at":"2016-10-21T15:23:10Z","html_url":"https://github.com/ultrabug/py3status/pull/527#discussion_r84501551","pull_request_url":"https://api.github.com/repos/ultrabug/py3status/pulls/527","_links":{"self":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/comments/84501551"},"html":{"href":"https://github.com/ultrabug/py3status/pull/527#discussion_r84501551"},"pull_request":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/527"}}},"pull_request":{"url":"https://api.github.com/repos/ultrabug/py3status/pulls/527","id":90371467,"html_url":"https://github.com/ultrabug/py3status/pull/527","diff_url":"https://github.com/ultrabug/py3status/pull/527.diff","patch_url":"https://github.com/ultrabug/py3status/pull/527.patch","issue_url":"https://api.github.com/repos/ultrabug/py3status/issues/527","number":527,"state":"open","locked":false,"title":"Formatter and Composite updates","user":{"login":"tobes","id":56311,"avatar_url":"https://avatars.githubusercontent.com/u/56311?v=3","gravatar_id":"","url":"https://api.github.com/users/tobes","html_url":"https://github.com/tobes","followers_url":"https://api.github.com/users/tobes/followers","following_url":"https://api.github.com/users/tobes/following{/other_user}","gists_url":"https://api.github.com/users/tobes/gists{/gist_id}","starred_url":"https://api.github.com/users/tobes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobes/subscriptions","organizations_url":"https://api.github.com/users/tobes/orgs","repos_url":"https://api.github.com/users/tobes/repos","events_url":"https://api.github.com/users/tobes/events{/privacy}","received_events_url":"https://api.github.com/users/tobes/received_events","type":"User","site_admin":false},"body":"Updates to the formatter.\r\n\r\n* Composites in the formatter now return a `Composite` object rather than a list (if a composite is created eg when `\\?color=XXX` is used in a format string).  This allows us to add composites via `param_dict`.\r\n\r\n* A `Composite` is basically a wrapped list but allows us to know that it is a composite rather than just a list.  It also allows easier appending/creating as it understands strings, lists, dicts and Composites.  It also has some helper functions.\r\n\r\n* Seeing as how `safe_format()` can return a `Composite` and add them via `param_dict` there is less need for `build_composite()` so it can be deprecated.\r\n\r\n* `safe_format()` can be forced to return a composite.  This is helpful if the module will manipulate the result etc.\r\n\r\n* `composite_join()`, `composite_update()`, `composite_create()`, `is_composite()` helper functions added to `Py3`.\r\n\r\n* Fix various bugs in the formatter and add new tests to catch them\r\n\r\n* Merging of Composite components improved\r\n\r\n* `module.py` accepts Composites in responses\r\n\r\n* Hex colors passed to formatter via `\\?color=#xxxxxx` are checked, upper-cased to aid merging and now values like `#xxx` are also allowed\r\n\r\n* As well as some general formatter fixes this allows us to start doing some more interesting things for example with a few minor changes `weather_yahoo` can allow me to choose custom colors for each weather icon (without having to add any extra config parameters)\r\n\r\n* Most modules will just continue to work as they are with no changes, only ones that manipulate the result of `safe_format()` need to worry about these changes and they already need to care to some extent so the disruption to module writers is minimal.\r\n\r\nI still need to do some more documentation and write some more Composite tests but the actual code shouldn't be changing so any reviews would be helpful","created_at":"2016-10-21T12:00:56Z","updated_at":"2016-10-21T15:23:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4c6259c22c3255c2f24ad77b0536af49acd9a96","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ultrabug/py3status/pulls/527/commits","review_comments_url":"https://api.github.com/repos/ultrabug/py3status/pulls/527/comments","review_comment_url":"https://api.github.com/repos/ultrabug/py3status/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ultrabug/py3status/issues/527/comments","statuses_url":"https://api.github.com/repos/ultrabug/py3status/statuses/be7e21f7b9bc53aceda8bd08c8f59a4af69f6ff1","head":{"label":"ultrabug:formatter-composites","ref":"formatter-composites","sha":"be7e21f7b9bc53aceda8bd08c8f59a4af69f6ff1","user":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"repo":{"id":8292338,"name":"py3status","full_name":"ultrabug/py3status","owner":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ultrabug/py3status","description":"py3status is an extensible i3status wrapper written in python","fork":false,"url":"https://api.github.com/repos/ultrabug/py3status","forks_url":"https://api.github.com/repos/ultrabug/py3status/forks","keys_url":"https://api.github.com/repos/ultrabug/py3status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ultrabug/py3status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ultrabug/py3status/teams","hooks_url":"https://api.github.com/repos/ultrabug/py3status/hooks","issue_events_url":"https://api.github.com/repos/ultrabug/py3status/issues/events{/number}","events_url":"https://api.github.com/repos/ultrabug/py3status/events","assignees_url":"https://api.github.com/repos/ultrabug/py3status/assignees{/user}","branches_url":"https://api.github.com/repos/ultrabug/py3status/branches{/branch}","tags_url":"https://api.github.com/repos/ultrabug/py3status/tags","blobs_url":"https://api.github.com/repos/ultrabug/py3status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ultrabug/py3status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ultrabug/py3status/git/refs{/sha}","trees_url":"https://api.github.com/repos/ultrabug/py3status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ultrabug/py3status/statuses/{sha}","languages_url":"https://api.github.com/repos/ultrabug/py3status/languages","stargazers_url":"https://api.github.com/repos/ultrabug/py3status/stargazers","contributors_url":"https://api.github.com/repos/ultrabug/py3status/contributors","subscribers_url":"https://api.github.com/repos/ultrabug/py3status/subscribers","subscription_url":"https://api.github.com/repos/ultrabug/py3status/subscription","commits_url":"https://api.github.com/repos/ultrabug/py3status/commits{/sha}","git_commits_url":"https://api.github.com/repos/ultrabug/py3status/git/commits{/sha}","comments_url":"https://api.github.com/repos/ultrabug/py3status/comments{/number}","issue_comment_url":"https://api.github.com/repos/ultrabug/py3status/issues/comments{/number}","contents_url":"https://api.github.com/repos/ultrabug/py3status/contents/{+path}","compare_url":"https://api.github.com/repos/ultrabug/py3status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ultrabug/py3status/merges","archive_url":"https://api.github.com/repos/ultrabug/py3status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ultrabug/py3status/downloads","issues_url":"https://api.github.com/repos/ultrabug/py3status/issues{/number}","pulls_url":"https://api.github.com/repos/ultrabug/py3status/pulls{/number}","milestones_url":"https://api.github.com/repos/ultrabug/py3status/milestones{/number}","notifications_url":"https://api.github.com/repos/ultrabug/py3status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ultrabug/py3status/labels{/name}","releases_url":"https://api.github.com/repos/ultrabug/py3status/releases{/id}","deployments_url":"https://api.github.com/repos/ultrabug/py3status/deployments","created_at":"2013-02-19T14:59:13Z","updated_at":"2016-10-21T00:17:11Z","pushed_at":"2016-10-21T15:22:47Z","git_url":"git://github.com/ultrabug/py3status.git","ssh_url":"git@github.com:ultrabug/py3status.git","clone_url":"https://github.com/ultrabug/py3status.git","svn_url":"https://github.com/ultrabug/py3status","homepage":"","size":2383,"stargazers_count":315,"watchers_count":315,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":120,"mirror_url":null,"open_issues_count":46,"forks":120,"open_issues":46,"watchers":315,"default_branch":"master"}},"base":{"label":"ultrabug:master","ref":"master","sha":"b13cb13204079014bb110b7befb949e263ac66e9","user":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"repo":{"id":8292338,"name":"py3status","full_name":"ultrabug/py3status","owner":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ultrabug/py3status","description":"py3status is an extensible i3status wrapper written in python","fork":false,"url":"https://api.github.com/repos/ultrabug/py3status","forks_url":"https://api.github.com/repos/ultrabug/py3status/forks","keys_url":"https://api.github.com/repos/ultrabug/py3status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ultrabug/py3status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ultrabug/py3status/teams","hooks_url":"https://api.github.com/repos/ultrabug/py3status/hooks","issue_events_url":"https://api.github.com/repos/ultrabug/py3status/issues/events{/number}","events_url":"https://api.github.com/repos/ultrabug/py3status/events","assignees_url":"https://api.github.com/repos/ultrabug/py3status/assignees{/user}","branches_url":"https://api.github.com/repos/ultrabug/py3status/branches{/branch}","tags_url":"https://api.github.com/repos/ultrabug/py3status/tags","blobs_url":"https://api.github.com/repos/ultrabug/py3status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ultrabug/py3status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ultrabug/py3status/git/refs{/sha}","trees_url":"https://api.github.com/repos/ultrabug/py3status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ultrabug/py3status/statuses/{sha}","languages_url":"https://api.github.com/repos/ultrabug/py3status/languages","stargazers_url":"https://api.github.com/repos/ultrabug/py3status/stargazers","contributors_url":"https://api.github.com/repos/ultrabug/py3status/contributors","subscribers_url":"https://api.github.com/repos/ultrabug/py3status/subscribers","subscription_url":"https://api.github.com/repos/ultrabug/py3status/subscription","commits_url":"https://api.github.com/repos/ultrabug/py3status/commits{/sha}","git_commits_url":"https://api.github.com/repos/ultrabug/py3status/git/commits{/sha}","comments_url":"https://api.github.com/repos/ultrabug/py3status/comments{/number}","issue_comment_url":"https://api.github.com/repos/ultrabug/py3status/issues/comments{/number}","contents_url":"https://api.github.com/repos/ultrabug/py3status/contents/{+path}","compare_url":"https://api.github.com/repos/ultrabug/py3status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ultrabug/py3status/merges","archive_url":"https://api.github.com/repos/ultrabug/py3status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ultrabug/py3status/downloads","issues_url":"https://api.github.com/repos/ultrabug/py3status/issues{/number}","pulls_url":"https://api.github.com/repos/ultrabug/py3status/pulls{/number}","milestones_url":"https://api.github.com/repos/ultrabug/py3status/milestones{/number}","notifications_url":"https://api.github.com/repos/ultrabug/py3status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ultrabug/py3status/labels{/name}","releases_url":"https://api.github.com/repos/ultrabug/py3status/releases{/id}","deployments_url":"https://api.github.com/repos/ultrabug/py3status/deployments","created_at":"2013-02-19T14:59:13Z","updated_at":"2016-10-21T00:17:11Z","pushed_at":"2016-10-21T15:22:47Z","git_url":"git://github.com/ultrabug/py3status.git","ssh_url":"git@github.com:ultrabug/py3status.git","clone_url":"https://github.com/ultrabug/py3status.git","svn_url":"https://github.com/ultrabug/py3status","homepage":"","size":2383,"stargazers_count":315,"watchers_count":315,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":120,"mirror_url":null,"open_issues_count":46,"forks":120,"open_issues":46,"watchers":315,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/527"},"html":{"href":"https://github.com/ultrabug/py3status/pull/527"},"issue":{"href":"https://api.github.com/repos/ultrabug/py3status/issues/527"},"comments":{"href":"https://api.github.com/repos/ultrabug/py3status/issues/527/comments"},"review_comments":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/527/comments"},"review_comment":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/527/commits"},"statuses":{"href":"https://api.github.com/repos/ultrabug/py3status/statuses/be7e21f7b9bc53aceda8bd08c8f59a4af69f6ff1"}}}}
{"actor":{"display_login":"tobes"}}