{"action":"created","comment":{"url":"https://api.github.com/repos/pazz/alot/pulls/comments/93664785","pull_request_review_id":14197521,"id":93664785,"diff_hunk":"@@ -0,0 +1,102 @@\n+# -*- coding: utf-8 -*-\n+\n+import logging\n+import urwid\n+from urwidtrees import Tree\n+from alot.settings import settings\n+\n+\n+class FolderWidget(urwid.WidgetWrap):\n+    \"\"\"\n+    special widget for displaying folder, so we can distinguish between\n+    empty and focused folders\n+    \"\"\"\n+    def __init__(self, folder):\n+        self.folder = folder\n+        self.txt = urwid.Text(str(folder), wrap='clip')\n+        if folder.count > 0:\n+            normal_att = settings.get_theming_attribute('folders', 'line')\n+        else:\n+            normal_att = settings.get_theming_attribute('folders', 'line_empty')\n+        focus_att = settings.get_theming_attribute('folders', 'line_focus')\n+        line = urwid.AttrMap(self.txt, normal_att, focus_att)\n+        logging.debug(\"line = %s\", line)\n+        urwid.WidgetWrap.__init__(self, line)\n+\n+    def selectable(self):\n+        return True\n+\n+    def keypress(self, size, key):","path":"alot/widgets/folders.py","position":29,"original_position":29,"commit_id":"78767e230add9c5af6218b76d0004985ad8b5966","original_commit_id":"78767e230add9c5af6218b76d0004985ad8b5966","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Method could be a function](https://www.codacy.com/app/patricktotzke/alot/file/4802108517/issues/source?bid=4024483&fileBranchId=4024518#l29)","created_at":"2016-12-22T17:29:37Z","updated_at":"2016-12-22T17:29:37Z","html_url":"https://github.com/pazz/alot/pull/757#discussion_r93664785","pull_request_url":"https://api.github.com/repos/pazz/alot/pulls/757","_links":{"self":{"href":"https://api.github.com/repos/pazz/alot/pulls/comments/93664785"},"html":{"href":"https://github.com/pazz/alot/pull/757#discussion_r93664785"},"pull_request":{"href":"https://api.github.com/repos/pazz/alot/pulls/757"}}},"pull_request":{"url":"https://api.github.com/repos/pazz/alot/pulls/757","id":30706595,"html_url":"https://github.com/pazz/alot/pull/757","diff_url":"https://github.com/pazz/alot/pull/757.diff","patch_url":"https://github.com/pazz/alot/pull/757.patch","issue_url":"https://api.github.com/repos/pazz/alot/issues/757","number":757,"state":"open","locked":false,"title":"RFE: implement folder tree buffer","user":{"login":"TomasTomecek","id":1662493,"avatar_url":"https://avatars.githubusercontent.com/u/1662493?v=3","gravatar_id":"","url":"https://api.github.com/users/TomasTomecek","html_url":"https://github.com/TomasTomecek","followers_url":"https://api.github.com/users/TomasTomecek/followers","following_url":"https://api.github.com/users/TomasTomecek/following{/other_user}","gists_url":"https://api.github.com/users/TomasTomecek/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasTomecek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasTomecek/subscriptions","organizations_url":"https://api.github.com/users/TomasTomecek/orgs","repos_url":"https://api.github.com/users/TomasTomecek/repos","events_url":"https://api.github.com/users/TomasTomecek/events{/privacy}","received_events_url":"https://api.github.com/users/TomasTomecek/received_events","type":"User","site_admin":false},"body":"Related to #331 \n## Contains\n- discover maildir structure\n- query notmuch for # of unread msgs in folders\n- display as tree\n- theming:\n  - empty folders\n  - not empty folders\n  - focused folders\n- configuration\n  - path to maildir\n  - blacklisted folders\n- enable (un)folding\n- implement refresh\n## Bugs\n\n(these should be addressed **before** merging)\n- [x] ~~collapse/expand all doesn't work~~ (IMO doesn't make much sense)\n- [x] function next/previous unread folder behaves oddly on subfolders\n- [x] get rid of TODOs and FIXMEs from the patch\n- [x] docs\n  - [x] written docs\n  - [x] docstrings\n## RFEs\n\n(these may be addressed in subsequent PRs)\n- completion for folders when searching\n- new command: pre-complete searching for selected folder\n- figure out something better for status line of folders buffer (e.g. # of new messages in favorite folders)\n","created_at":"2015-03-07T18:06:41Z","updated_at":"2016-12-22T17:29:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc2a7a1d3e8f6da90d627d12fd0d896eb202ba8b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pazz/alot/pulls/757/commits","review_comments_url":"https://api.github.com/repos/pazz/alot/pulls/757/comments","review_comment_url":"https://api.github.com/repos/pazz/alot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pazz/alot/issues/757/comments","statuses_url":"https://api.github.com/repos/pazz/alot/statuses/78767e230add9c5af6218b76d0004985ad8b5966","head":{"label":"TomasTomecek:folder-tree-wip","ref":"folder-tree-wip","sha":"78767e230add9c5af6218b76d0004985ad8b5966","user":{"login":"TomasTomecek","id":1662493,"avatar_url":"https://avatars.githubusercontent.com/u/1662493?v=3","gravatar_id":"","url":"https://api.github.com/users/TomasTomecek","html_url":"https://github.com/TomasTomecek","followers_url":"https://api.github.com/users/TomasTomecek/followers","following_url":"https://api.github.com/users/TomasTomecek/following{/other_user}","gists_url":"https://api.github.com/users/TomasTomecek/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasTomecek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasTomecek/subscriptions","organizations_url":"https://api.github.com/users/TomasTomecek/orgs","repos_url":"https://api.github.com/users/TomasTomecek/repos","events_url":"https://api.github.com/users/TomasTomecek/events{/privacy}","received_events_url":"https://api.github.com/users/TomasTomecek/received_events","type":"User","site_admin":false},"repo":{"id":21497180,"name":"alot","full_name":"TomasTomecek/alot","owner":{"login":"TomasTomecek","id":1662493,"avatar_url":"https://avatars.githubusercontent.com/u/1662493?v=3","gravatar_id":"","url":"https://api.github.com/users/TomasTomecek","html_url":"https://github.com/TomasTomecek","followers_url":"https://api.github.com/users/TomasTomecek/followers","following_url":"https://api.github.com/users/TomasTomecek/following{/other_user}","gists_url":"https://api.github.com/users/TomasTomecek/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasTomecek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasTomecek/subscriptions","organizations_url":"https://api.github.com/users/TomasTomecek/orgs","repos_url":"https://api.github.com/users/TomasTomecek/repos","events_url":"https://api.github.com/users/TomasTomecek/events{/privacy}","received_events_url":"https://api.github.com/users/TomasTomecek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TomasTomecek/alot","description":"commandline MUA using notmuch and urwid","fork":true,"url":"https://api.github.com/repos/TomasTomecek/alot","forks_url":"https://api.github.com/repos/TomasTomecek/alot/forks","keys_url":"https://api.github.com/repos/TomasTomecek/alot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TomasTomecek/alot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TomasTomecek/alot/teams","hooks_url":"https://api.github.com/repos/TomasTomecek/alot/hooks","issue_events_url":"https://api.github.com/repos/TomasTomecek/alot/issues/events{/number}","events_url":"https://api.github.com/repos/TomasTomecek/alot/events","assignees_url":"https://api.github.com/repos/TomasTomecek/alot/assignees{/user}","branches_url":"https://api.github.com/repos/TomasTomecek/alot/branches{/branch}","tags_url":"https://api.github.com/repos/TomasTomecek/alot/tags","blobs_url":"https://api.github.com/repos/TomasTomecek/alot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TomasTomecek/alot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TomasTomecek/alot/git/refs{/sha}","trees_url":"https://api.github.com/repos/TomasTomecek/alot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TomasTomecek/alot/statuses/{sha}","languages_url":"https://api.github.com/repos/TomasTomecek/alot/languages","stargazers_url":"https://api.github.com/repos/TomasTomecek/alot/stargazers","contributors_url":"https://api.github.com/repos/TomasTomecek/alot/contributors","subscribers_url":"https://api.github.com/repos/TomasTomecek/alot/subscribers","subscription_url":"https://api.github.com/repos/TomasTomecek/alot/subscription","commits_url":"https://api.github.com/repos/TomasTomecek/alot/commits{/sha}","git_commits_url":"https://api.github.com/repos/TomasTomecek/alot/git/commits{/sha}","comments_url":"https://api.github.com/repos/TomasTomecek/alot/comments{/number}","issue_comment_url":"https://api.github.com/repos/TomasTomecek/alot/issues/comments{/number}","contents_url":"https://api.github.com/repos/TomasTomecek/alot/contents/{+path}","compare_url":"https://api.github.com/repos/TomasTomecek/alot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TomasTomecek/alot/merges","archive_url":"https://api.github.com/repos/TomasTomecek/alot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TomasTomecek/alot/downloads","issues_url":"https://api.github.com/repos/TomasTomecek/alot/issues{/number}","pulls_url":"https://api.github.com/repos/TomasTomecek/alot/pulls{/number}","milestones_url":"https://api.github.com/repos/TomasTomecek/alot/milestones{/number}","notifications_url":"https://api.github.com/repos/TomasTomecek/alot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TomasTomecek/alot/labels{/name}","releases_url":"https://api.github.com/repos/TomasTomecek/alot/releases{/id}","deployments_url":"https://api.github.com/repos/TomasTomecek/alot/deployments","created_at":"2014-07-04T12:52:42Z","updated_at":"2015-01-15T11:58:14Z","pushed_at":"2016-01-04T12:08:47Z","git_url":"git://github.com/TomasTomecek/alot.git","ssh_url":"git@github.com:TomasTomecek/alot.git","clone_url":"https://github.com/TomasTomecek/alot.git","svn_url":"https://github.com/TomasTomecek/alot","homepage":"","size":7606,"stargazers_count":1,"watchers_count":1,"language":null,"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":1,"default_branch":"master"}},"base":{"label":"pazz:master","ref":"master","sha":"6fdf5d708f5ea2c1236a50815d13f9c031c5f8e6","user":{"login":"pazz","id":628455,"avatar_url":"https://avatars.githubusercontent.com/u/628455?v=3","gravatar_id":"","url":"https://api.github.com/users/pazz","html_url":"https://github.com/pazz","followers_url":"https://api.github.com/users/pazz/followers","following_url":"https://api.github.com/users/pazz/following{/other_user}","gists_url":"https://api.github.com/users/pazz/gists{/gist_id}","starred_url":"https://api.github.com/users/pazz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pazz/subscriptions","organizations_url":"https://api.github.com/users/pazz/orgs","repos_url":"https://api.github.com/users/pazz/repos","events_url":"https://api.github.com/users/pazz/events{/privacy}","received_events_url":"https://api.github.com/users/pazz/received_events","type":"User","site_admin":false},"repo":{"id":2197977,"name":"alot","full_name":"pazz/alot","owner":{"login":"pazz","id":628455,"avatar_url":"https://avatars.githubusercontent.com/u/628455?v=3","gravatar_id":"","url":"https://api.github.com/users/pazz","html_url":"https://github.com/pazz","followers_url":"https://api.github.com/users/pazz/followers","following_url":"https://api.github.com/users/pazz/following{/other_user}","gists_url":"https://api.github.com/users/pazz/gists{/gist_id}","starred_url":"https://api.github.com/users/pazz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pazz/subscriptions","organizations_url":"https://api.github.com/users/pazz/orgs","repos_url":"https://api.github.com/users/pazz/repos","events_url":"https://api.github.com/users/pazz/events{/privacy}","received_events_url":"https://api.github.com/users/pazz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pazz/alot","description":"commandline MUA based on notmuch and urwid","fork":false,"url":"https://api.github.com/repos/pazz/alot","forks_url":"https://api.github.com/repos/pazz/alot/forks","keys_url":"https://api.github.com/repos/pazz/alot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pazz/alot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pazz/alot/teams","hooks_url":"https://api.github.com/repos/pazz/alot/hooks","issue_events_url":"https://api.github.com/repos/pazz/alot/issues/events{/number}","events_url":"https://api.github.com/repos/pazz/alot/events","assignees_url":"https://api.github.com/repos/pazz/alot/assignees{/user}","branches_url":"https://api.github.com/repos/pazz/alot/branches{/branch}","tags_url":"https://api.github.com/repos/pazz/alot/tags","blobs_url":"https://api.github.com/repos/pazz/alot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pazz/alot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pazz/alot/git/refs{/sha}","trees_url":"https://api.github.com/repos/pazz/alot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pazz/alot/statuses/{sha}","languages_url":"https://api.github.com/repos/pazz/alot/languages","stargazers_url":"https://api.github.com/repos/pazz/alot/stargazers","contributors_url":"https://api.github.com/repos/pazz/alot/contributors","subscribers_url":"https://api.github.com/repos/pazz/alot/subscribers","subscription_url":"https://api.github.com/repos/pazz/alot/subscription","commits_url":"https://api.github.com/repos/pazz/alot/commits{/sha}","git_commits_url":"https://api.github.com/repos/pazz/alot/git/commits{/sha}","comments_url":"https://api.github.com/repos/pazz/alot/comments{/number}","issue_comment_url":"https://api.github.com/repos/pazz/alot/issues/comments{/number}","contents_url":"https://api.github.com/repos/pazz/alot/contents/{+path}","compare_url":"https://api.github.com/repos/pazz/alot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pazz/alot/merges","archive_url":"https://api.github.com/repos/pazz/alot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pazz/alot/downloads","issues_url":"https://api.github.com/repos/pazz/alot/issues{/number}","pulls_url":"https://api.github.com/repos/pazz/alot/pulls{/number}","milestones_url":"https://api.github.com/repos/pazz/alot/milestones{/number}","notifications_url":"https://api.github.com/repos/pazz/alot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pazz/alot/labels{/name}","releases_url":"https://api.github.com/repos/pazz/alot/releases{/id}","deployments_url":"https://api.github.com/repos/pazz/alot/deployments","created_at":"2011-08-12T16:22:37Z","updated_at":"2016-12-21T18:39:05Z","pushed_at":"2016-12-22T01:19:15Z","git_url":"git://github.com/pazz/alot.git","ssh_url":"git@github.com:pazz/alot.git","clone_url":"https://github.com/pazz/alot.git","svn_url":"https://github.com/pazz/alot","homepage":"","size":6849,"stargazers_count":299,"watchers_count":299,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":86,"mirror_url":null,"open_issues_count":181,"forks":86,"open_issues":181,"watchers":299,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pazz/alot/pulls/757"},"html":{"href":"https://github.com/pazz/alot/pull/757"},"issue":{"href":"https://api.github.com/repos/pazz/alot/issues/757"},"comments":{"href":"https://api.github.com/repos/pazz/alot/issues/757/comments"},"review_comments":{"href":"https://api.github.com/repos/pazz/alot/pulls/757/comments"},"review_comment":{"href":"https://api.github.com/repos/pazz/alot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pazz/alot/pulls/757/commits"},"statuses":{"href":"https://api.github.com/repos/pazz/alot/statuses/78767e230add9c5af6218b76d0004985ad8b5966"}}}}
{"actor":{"display_login":"codacy-bot"}}