{"action":"created","comment":{"url":"https://api.github.com/repos/google/openhtf/pulls/comments/70946254","id":70946254,"diff_hunk":"@@ -0,0 +1,90 @@\n+\n+import astroid\n+\n+from astroid import MANAGER\n+from pylint import lint\n+\n+def __init__(self):\n+  pass\n+\n+\n+#didn't change/work on this yet\n+def wrap_add_message(func):\n+  def add_message(msg_descr, line=None, node=None, args=None, confidence=None):\n+    kwargs = {'confidence': confidence} if confidence else {}\n+    if (msg_descr != 'no-member' or\n+        args[0:2] != ('Module', 'openhtf.conf')):\n+      return func(msg_descr, line, node, args, **kwargs)\n+    # We're sure it's a no-member warning for the openhtf.conf module.\n+    try:\n+      if args[2] in node.root()._declared_conf_keys:\n+        # We found a declaration for the symbol, just skip this message.\n+        return\n+    except AttributeError:\n+      pass\n+\n+    # TODO(maddychan): Figure out how to add a custom failure message here.\n+    return func('no-member', line, node, args, **kwargs)\n+\n+  return add_message\n+\n+#storing a reference to the openhtf.conf module node\n+clss = []\n+clss_locals = {}\n+current_root = []\n+\n+def trans_expr(node):\n+  if (isinstance(node.func, astroid.Attribute) and\n+      isinstance(node.func.expr, astroid.Name) and\n+      node.func.expr.name == 'conf' and\n+      node.func.attrname == 'Declare'):\n+\n+    #import pdb\n+    #pdb.set_trace()\n+\n+    #keeping track of the current root, refreshing the locals if it changes\n+    if current_root == []:","path":"pylint_plugins/conf_plugin.py","position":46,"original_position":46,"commit_id":"c8633453c600c890d2d95e899ece4c6158a3b13f","original_commit_id":"c8633453c600c890d2d95e899ece4c6158a3b13f","user":{"login":"grybmadsci","id":14081283,"avatar_url":"https://avatars.githubusercontent.com/u/14081283?v=3","gravatar_id":"","url":"https://api.github.com/users/grybmadsci","html_url":"https://github.com/grybmadsci","followers_url":"https://api.github.com/users/grybmadsci/followers","following_url":"https://api.github.com/users/grybmadsci/following{/other_user}","gists_url":"https://api.github.com/users/grybmadsci/gists{/gist_id}","starred_url":"https://api.github.com/users/grybmadsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grybmadsci/subscriptions","organizations_url":"https://api.github.com/users/grybmadsci/orgs","repos_url":"https://api.github.com/users/grybmadsci/repos","events_url":"https://api.github.com/users/grybmadsci/events{/privacy}","received_events_url":"https://api.github.com/users/grybmadsci/received_events","type":"User","site_admin":false},"body":"`if not current_root:`","created_at":"2016-07-15T09:34:53Z","updated_at":"2016-07-15T09:34:53Z","html_url":"https://github.com/google/openhtf/pull/359#discussion_r70946254","pull_request_url":"https://api.github.com/repos/google/openhtf/pulls/359","_links":{"self":{"href":"https://api.github.com/repos/google/openhtf/pulls/comments/70946254"},"html":{"href":"https://github.com/google/openhtf/pull/359#discussion_r70946254"},"pull_request":{"href":"https://api.github.com/repos/google/openhtf/pulls/359"}}},"pull_request":{"url":"https://api.github.com/repos/google/openhtf/pulls/359","id":77543290,"html_url":"https://github.com/google/openhtf/pull/359","diff_url":"https://github.com/google/openhtf/pull/359.diff","patch_url":"https://github.com/google/openhtf/pull/359.patch","issue_url":"https://api.github.com/repos/google/openhtf/issues/359","number":359,"state":"open","locked":false,"title":"Pylint plugin","user":{"login":"maddychan","id":9475928,"avatar_url":"https://avatars.githubusercontent.com/u/9475928?v=3","gravatar_id":"","url":"https://api.github.com/users/maddychan","html_url":"https://github.com/maddychan","followers_url":"https://api.github.com/users/maddychan/followers","following_url":"https://api.github.com/users/maddychan/following{/other_user}","gists_url":"https://api.github.com/users/maddychan/gists{/gist_id}","starred_url":"https://api.github.com/users/maddychan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddychan/subscriptions","organizations_url":"https://api.github.com/users/maddychan/orgs","repos_url":"https://api.github.com/users/maddychan/repos","events_url":"https://api.github.com/users/maddychan/events{/privacy}","received_events_url":"https://api.github.com/users/maddychan/received_events","type":"User","site_admin":false},"body":"Add pylint plugin to deal with conf module. Take care of warning messages but doesn't check for whether the dynamically added attributes are instantiated in the same module as they're used yet","created_at":"2016-07-14T23:35:22Z","updated_at":"2016-07-15T09:34:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0904277b258cccbaa0ac6b59b426310eb11652fb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/openhtf/pulls/359/commits","review_comments_url":"https://api.github.com/repos/google/openhtf/pulls/359/comments","review_comment_url":"https://api.github.com/repos/google/openhtf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/openhtf/issues/359/comments","statuses_url":"https://api.github.com/repos/google/openhtf/statuses/c8633453c600c890d2d95e899ece4c6158a3b13f","head":{"label":"maddychan:pylint_plugin","ref":"pylint_plugin","sha":"c8633453c600c890d2d95e899ece4c6158a3b13f","user":{"login":"maddychan","id":9475928,"avatar_url":"https://avatars.githubusercontent.com/u/9475928?v=3","gravatar_id":"","url":"https://api.github.com/users/maddychan","html_url":"https://github.com/maddychan","followers_url":"https://api.github.com/users/maddychan/followers","following_url":"https://api.github.com/users/maddychan/following{/other_user}","gists_url":"https://api.github.com/users/maddychan/gists{/gist_id}","starred_url":"https://api.github.com/users/maddychan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddychan/subscriptions","organizations_url":"https://api.github.com/users/maddychan/orgs","repos_url":"https://api.github.com/users/maddychan/repos","events_url":"https://api.github.com/users/maddychan/events{/privacy}","received_events_url":"https://api.github.com/users/maddychan/received_events","type":"User","site_admin":false},"repo":{"id":62077514,"name":"openhtf","full_name":"maddychan/openhtf","owner":{"login":"maddychan","id":9475928,"avatar_url":"https://avatars.githubusercontent.com/u/9475928?v=3","gravatar_id":"","url":"https://api.github.com/users/maddychan","html_url":"https://github.com/maddychan","followers_url":"https://api.github.com/users/maddychan/followers","following_url":"https://api.github.com/users/maddychan/following{/other_user}","gists_url":"https://api.github.com/users/maddychan/gists{/gist_id}","starred_url":"https://api.github.com/users/maddychan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddychan/subscriptions","organizations_url":"https://api.github.com/users/maddychan/orgs","repos_url":"https://api.github.com/users/maddychan/repos","events_url":"https://api.github.com/users/maddychan/events{/privacy}","received_events_url":"https://api.github.com/users/maddychan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maddychan/openhtf","description":null,"fork":true,"url":"https://api.github.com/repos/maddychan/openhtf","forks_url":"https://api.github.com/repos/maddychan/openhtf/forks","keys_url":"https://api.github.com/repos/maddychan/openhtf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maddychan/openhtf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maddychan/openhtf/teams","hooks_url":"https://api.github.com/repos/maddychan/openhtf/hooks","issue_events_url":"https://api.github.com/repos/maddychan/openhtf/issues/events{/number}","events_url":"https://api.github.com/repos/maddychan/openhtf/events","assignees_url":"https://api.github.com/repos/maddychan/openhtf/assignees{/user}","branches_url":"https://api.github.com/repos/maddychan/openhtf/branches{/branch}","tags_url":"https://api.github.com/repos/maddychan/openhtf/tags","blobs_url":"https://api.github.com/repos/maddychan/openhtf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maddychan/openhtf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maddychan/openhtf/git/refs{/sha}","trees_url":"https://api.github.com/repos/maddychan/openhtf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maddychan/openhtf/statuses/{sha}","languages_url":"https://api.github.com/repos/maddychan/openhtf/languages","stargazers_url":"https://api.github.com/repos/maddychan/openhtf/stargazers","contributors_url":"https://api.github.com/repos/maddychan/openhtf/contributors","subscribers_url":"https://api.github.com/repos/maddychan/openhtf/subscribers","subscription_url":"https://api.github.com/repos/maddychan/openhtf/subscription","commits_url":"https://api.github.com/repos/maddychan/openhtf/commits{/sha}","git_commits_url":"https://api.github.com/repos/maddychan/openhtf/git/commits{/sha}","comments_url":"https://api.github.com/repos/maddychan/openhtf/comments{/number}","issue_comment_url":"https://api.github.com/repos/maddychan/openhtf/issues/comments{/number}","contents_url":"https://api.github.com/repos/maddychan/openhtf/contents/{+path}","compare_url":"https://api.github.com/repos/maddychan/openhtf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maddychan/openhtf/merges","archive_url":"https://api.github.com/repos/maddychan/openhtf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maddychan/openhtf/downloads","issues_url":"https://api.github.com/repos/maddychan/openhtf/issues{/number}","pulls_url":"https://api.github.com/repos/maddychan/openhtf/pulls{/number}","milestones_url":"https://api.github.com/repos/maddychan/openhtf/milestones{/number}","notifications_url":"https://api.github.com/repos/maddychan/openhtf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maddychan/openhtf/labels{/name}","releases_url":"https://api.github.com/repos/maddychan/openhtf/releases{/id}","deployments_url":"https://api.github.com/repos/maddychan/openhtf/deployments","created_at":"2016-06-27T18:13:28Z","updated_at":"2016-06-27T18:13:29Z","pushed_at":"2016-07-15T01:25:29Z","git_url":"git://github.com/maddychan/openhtf.git","ssh_url":"git@github.com:maddychan/openhtf.git","clone_url":"https://github.com/maddychan/openhtf.git","svn_url":"https://github.com/maddychan/openhtf","homepage":null,"size":22185,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"bc12c6899232e76fe5fc40c239a49263dbbc49f3","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":41519483,"name":"openhtf","full_name":"google/openhtf","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/openhtf","description":null,"fork":false,"url":"https://api.github.com/repos/google/openhtf","forks_url":"https://api.github.com/repos/google/openhtf/forks","keys_url":"https://api.github.com/repos/google/openhtf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/openhtf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/openhtf/teams","hooks_url":"https://api.github.com/repos/google/openhtf/hooks","issue_events_url":"https://api.github.com/repos/google/openhtf/issues/events{/number}","events_url":"https://api.github.com/repos/google/openhtf/events","assignees_url":"https://api.github.com/repos/google/openhtf/assignees{/user}","branches_url":"https://api.github.com/repos/google/openhtf/branches{/branch}","tags_url":"https://api.github.com/repos/google/openhtf/tags","blobs_url":"https://api.github.com/repos/google/openhtf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/openhtf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/openhtf/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/openhtf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/openhtf/statuses/{sha}","languages_url":"https://api.github.com/repos/google/openhtf/languages","stargazers_url":"https://api.github.com/repos/google/openhtf/stargazers","contributors_url":"https://api.github.com/repos/google/openhtf/contributors","subscribers_url":"https://api.github.com/repos/google/openhtf/subscribers","subscription_url":"https://api.github.com/repos/google/openhtf/subscription","commits_url":"https://api.github.com/repos/google/openhtf/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/openhtf/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/openhtf/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/openhtf/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/openhtf/contents/{+path}","compare_url":"https://api.github.com/repos/google/openhtf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/openhtf/merges","archive_url":"https://api.github.com/repos/google/openhtf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/openhtf/downloads","issues_url":"https://api.github.com/repos/google/openhtf/issues{/number}","pulls_url":"https://api.github.com/repos/google/openhtf/pulls{/number}","milestones_url":"https://api.github.com/repos/google/openhtf/milestones{/number}","notifications_url":"https://api.github.com/repos/google/openhtf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/openhtf/labels{/name}","releases_url":"https://api.github.com/repos/google/openhtf/releases{/id}","deployments_url":"https://api.github.com/repos/google/openhtf/deployments","created_at":"2015-08-28T01:14:17Z","updated_at":"2016-07-05T15:10:13Z","pushed_at":"2016-07-15T09:20:17Z","git_url":"git://github.com/google/openhtf.git","ssh_url":"git@github.com:google/openhtf.git","clone_url":"https://github.com/google/openhtf.git","svn_url":"https://github.com/google/openhtf","homepage":null,"size":24968,"stargazers_count":31,"watchers_count":31,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":77,"forks":22,"open_issues":77,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/openhtf/pulls/359"},"html":{"href":"https://github.com/google/openhtf/pull/359"},"issue":{"href":"https://api.github.com/repos/google/openhtf/issues/359"},"comments":{"href":"https://api.github.com/repos/google/openhtf/issues/359/comments"},"review_comments":{"href":"https://api.github.com/repos/google/openhtf/pulls/359/comments"},"review_comment":{"href":"https://api.github.com/repos/google/openhtf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/openhtf/pulls/359/commits"},"statuses":{"href":"https://api.github.com/repos/google/openhtf/statuses/c8633453c600c890d2d95e899ece4c6158a3b13f"}}}}
{"actor":{"display_login":"grybmadsci"}}