{"action":"created","issue":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/767","labels_url":"https://api.github.com/repos/PyCQA/pylint/issues/767/labels{/name}","comments_url":"https://api.github.com/repos/PyCQA/pylint/issues/767/comments","events_url":"https://api.github.com/repos/PyCQA/pylint/issues/767/events","html_url":"https://github.com/PyCQA/pylint/issues/767","id":125259397,"number":767,"title":"undefined-variable false positives with async/await","user":{"login":"belak","id":107097,"avatar_url":"https://avatars.githubusercontent.com/u/107097?v=3","gravatar_id":"","url":"https://api.github.com/users/belak","html_url":"https://github.com/belak","followers_url":"https://api.github.com/users/belak/followers","following_url":"https://api.github.com/users/belak/following{/other_user}","gists_url":"https://api.github.com/users/belak/gists{/gist_id}","starred_url":"https://api.github.com/users/belak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belak/subscriptions","organizations_url":"https://api.github.com/users/belak/orgs","repos_url":"https://api.github.com/users/belak/repos","events_url":"https://api.github.com/users/belak/events{/privacy}","received_events_url":"https://api.github.com/users/belak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PyCQA/pylint/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/PyCQA/pylint/labels/next_bug_fix","name":"next_bug_fix","color":"bfdadc"}],"state":"closed","locked":false,"assignee":{"login":"PCManticore","id":448166,"avatar_url":"https://avatars.githubusercontent.com/u/448166?v=3","gravatar_id":"","url":"https://api.github.com/users/PCManticore","html_url":"https://github.com/PCManticore","followers_url":"https://api.github.com/users/PCManticore/followers","following_url":"https://api.github.com/users/PCManticore/following{/other_user}","gists_url":"https://api.github.com/users/PCManticore/gists{/gist_id}","starred_url":"https://api.github.com/users/PCManticore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PCManticore/subscriptions","organizations_url":"https://api.github.com/users/PCManticore/orgs","repos_url":"https://api.github.com/users/PCManticore/repos","events_url":"https://api.github.com/users/PCManticore/events{/privacy}","received_events_url":"https://api.github.com/users/PCManticore/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-01-06T20:43:48Z","updated_at":"2016-01-09T15:17:38Z","closed_at":"2016-01-09T15:16:04Z","body":"https://travis-ci.org/belak/python-seabird/builds/100674977\r\n\r\nhttps://github.com/belak/python-seabird/blob/async-metar/seabird/plugins/metar.py\r\n\r\npylint dep versions:\r\nastroid-1.4.3 colorama-0.3.5 lazy-object-proxy-1.2.1 pylint-1.5.2 wrapt-1.10.6\r\n\r\nIt also errors with pylint==1.4.5, but I think it ends up being astroid errors there.\r\n\r\nThe relevant portion of the code for the lazy:\r\n\r\n```\r\n    async def metar_callback(self, cmd):\r\n        resp = await aiohttp.get(METAR_URL.format(cmd.remainder.upper()))\r\n        if resp.status == 404:\r\n            cmd.mention_reply('{} is not a valid METAR code'.format(\r\n                cmd.remainder))\r\n            return\r\n        elif resp.status != 200:\r\n            cmd.mention_reply('Unable to get METAR for {}'.format(\r\n                cmd.remainder))\r\n            return\r\n\r\n        try:\r\n            data = await resp.text()\r\n            cmd.mention_reply(data.split('\\n')[1])\r\n        except KeyError:\r\n            cmd.mention_reply('Malformed METAR data for {}'.format(\r\n                cmd.remainder))\r\n```\r\n\r\nAnd the log:\r\n```\r\n************* Module seabird.plugins.metar\r\nE: 21,50: Undefined variable 'cmd' (undefined-variable)\r\nE: 22,11: Undefined variable 'resp' (undefined-variable)\r\nE: 23,12: Undefined variable 'cmd' (undefined-variable)\r\nE: 24,16: Undefined variable 'cmd' (undefined-variable)\r\nE: 26,13: Undefined variable 'resp' (undefined-variable)\r\nE: 27,12: Undefined variable 'cmd' (undefined-variable)\r\nE: 28,16: Undefined variable 'cmd' (undefined-variable)\r\nE: 32,25: Undefined variable 'resp' (undefined-variable)\r\nE: 33,12: Undefined variable 'cmd' (undefined-variable)\r\nE: 33,30: Undefined variable 'data' (undefined-variable)\r\nE: 35,12: Undefined variable 'cmd' (undefined-variable)\r\nE: 36,16: Undefined variable 'cmd' (undefined-variable)\r\n```"},"comment":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/comments/170251131","html_url":"https://github.com/PyCQA/pylint/issues/767#issuecomment-170251131","issue_url":"https://api.github.com/repos/PyCQA/pylint/issues/767","id":170251131,"user":{"login":"PCManticore","id":448166,"avatar_url":"https://avatars.githubusercontent.com/u/448166?v=3","gravatar_id":"","url":"https://api.github.com/users/PCManticore","html_url":"https://github.com/PCManticore","followers_url":"https://api.github.com/users/PCManticore/followers","following_url":"https://api.github.com/users/PCManticore/following{/other_user}","gists_url":"https://api.github.com/users/PCManticore/gists{/gist_id}","starred_url":"https://api.github.com/users/PCManticore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PCManticore/subscriptions","organizations_url":"https://api.github.com/users/PCManticore/orgs","repos_url":"https://api.github.com/users/PCManticore/repos","events_url":"https://api.github.com/users/PCManticore/events{/privacy}","received_events_url":"https://api.github.com/users/PCManticore/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T15:17:38Z","updated_at":"2016-01-09T15:17:38Z","body":"Thanks for the report. The fix will be released as part of 1.5.3 in the following days (I hope on Monday)."}}