{"action":"created","comment":{"url":"https://api.github.com/repos/pazz/alot/pulls/comments/198083007","pull_request_review_id":131945554,"id":198083007,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODA4MzAwNw==","diff_hunk":"@@ -0,0 +1,77 @@\n+# Copyright (C) 2011-2018  Patrick Totzke <patricktotzke@gmail.com>\n+# This file is released under the GNU GPL, version 3 or a later revision.\n+# For further details see the COPYING file\n+import urwid\n+\n+from .buffer import Buffer\n+from ..settings.const import settings\n+from ..widgets.namedqueries import QuerylineWidget\n+\n+\n+class NamedQueriesBuffer(Buffer):\n+    \"\"\"lists named queries present in the notmuch database\"\"\"\n+\n+    modename = 'namedqueries'\n+\n+    def __init__(self, ui, filtfun):\n+        self.ui = ui\n+        self.filtfun = filtfun\n+        self.isinitialized = False\n+        self.rebuild()\n+        Buffer.__init__(self, ui, self.body)\n+\n+    def rebuild(self):\n+        self.queries = self.ui.dbman.get_named_queries()\n+\n+        if self.isinitialized:\n+            focusposition = self.querylist.get_focus()[1]","path":"alot/buffers/namedqueries.py","position":27,"original_position":27,"commit_id":"f3eb51da6313ab562152c92af54d5d9f4985d15b","original_commit_id":"f3eb51da6313ab562152c92af54d5d9f4985d15b","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","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://app.codacy.com/assets/images/favicon.png) Issue found: [Access to member 'querylist' before its definition line 52](https://app.codacy.com/app/patricktotzke/alot/pullRequest?prid=1818282)","created_at":"2018-06-26T09:53:54Z","updated_at":"2018-06-26T09:53:54Z","html_url":"https://github.com/pazz/alot/pull/1256#discussion_r198083007","pull_request_url":"https://api.github.com/repos/pazz/alot/pulls/1256","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/pazz/alot/pulls/comments/198083007"},"html":{"href":"https://github.com/pazz/alot/pull/1256#discussion_r198083007"},"pull_request":{"href":"https://api.github.com/repos/pazz/alot/pulls/1256"}}},"pull_request":{"url":"https://api.github.com/repos/pazz/alot/pulls/1256","id":196898587,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2ODk4NTg3","html_url":"https://github.com/pazz/alot/pull/1256","diff_url":"https://github.com/pazz/alot/pull/1256.diff","patch_url":"https://github.com/pazz/alot/pull/1256.patch","issue_url":"https://api.github.com/repos/pazz/alot/issues/1256","number":1256,"state":"open","locked":false,"title":"New buffer type for notmuch's named query strings","user":{"login":"pazz","id":628455,"node_id":"MDQ6VXNlcjYyODQ1NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/628455?v=4","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},"body":"This adds a new buffer that displays named queries similar to the taglist mode.\r\nIt so far offers only one command: select, which opens a new search buffer for the selected named query.\r\n\r\nThis is a rebased , fully splitted and refactored version of #1206, for easy review.\r\nTODO:\r\n\r\n- [x]  update the theme files in `alot/extra/themes`\r\n- [x] check in auto-generated docs\r\n- [x] add commands to manimulate named queries in this buffer\r\n- [x] add command to save a query in search buffers\r\n- [ ] tests\r\nTo test this, add some named queries manually via the notmuch CLI:\r\n\r\n```\r\nnotmuch config set query.foo \"bar\"\r\n```","created_at":"2018-06-23T12:03:44Z","updated_at":"2018-06-26T09:53:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e6f1b85862f947fffb93d9e5b7fa49c29243f50","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pazz/alot/pulls/1256/commits","review_comments_url":"https://api.github.com/repos/pazz/alot/pulls/1256/comments","review_comment_url":"https://api.github.com/repos/pazz/alot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pazz/alot/issues/1256/comments","statuses_url":"https://api.github.com/repos/pazz/alot/statuses/f3eb51da6313ab562152c92af54d5d9f4985d15b","head":{"label":"pazz:namedqueries","ref":"namedqueries","sha":"f3eb51da6313ab562152c92af54d5d9f4985d15b","user":{"login":"pazz","id":628455,"node_id":"MDQ6VXNlcjYyODQ1NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/628455?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkyMTk3OTc3","name":"alot","full_name":"pazz/alot","owner":{"login":"pazz","id":628455,"node_id":"MDQ6VXNlcjYyODQ1NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/628455?v=4","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":"Terminal-based Mail User Agent","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":"2018-06-25T23:51:49Z","pushed_at":"2018-06-26T09:49:14Z","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":7808,"stargazers_count":395,"watchers_count":395,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":156,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":108,"open_issues":156,"watchers":395,"default_branch":"master"}},"base":{"label":"pazz:master","ref":"master","sha":"34bc46fd07f355df9b7a07c4f1dcab469a0a2346","user":{"login":"pazz","id":628455,"node_id":"MDQ6VXNlcjYyODQ1NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/628455?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkyMTk3OTc3","name":"alot","full_name":"pazz/alot","owner":{"login":"pazz","id":628455,"node_id":"MDQ6VXNlcjYyODQ1NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/628455?v=4","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":"Terminal-based Mail User Agent","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":"2018-06-25T23:51:49Z","pushed_at":"2018-06-26T09:49:14Z","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":7808,"stargazers_count":395,"watchers_count":395,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":156,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":108,"open_issues":156,"watchers":395,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pazz/alot/pulls/1256"},"html":{"href":"https://github.com/pazz/alot/pull/1256"},"issue":{"href":"https://api.github.com/repos/pazz/alot/issues/1256"},"comments":{"href":"https://api.github.com/repos/pazz/alot/issues/1256/comments"},"review_comments":{"href":"https://api.github.com/repos/pazz/alot/pulls/1256/comments"},"review_comment":{"href":"https://api.github.com/repos/pazz/alot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pazz/alot/pulls/1256/commits"},"statuses":{"href":"https://api.github.com/repos/pazz/alot/statuses/f3eb51da6313ab562152c92af54d5d9f4985d15b"}},"author_association":"OWNER"}}
{"actor":{"display_login":"codacy-bot"}}