{"action":"created","issue":{"url":"https://api.github.com/repos/PyCQA/pyflakes/issues/265","repository_url":"https://api.github.com/repos/PyCQA/pyflakes","labels_url":"https://api.github.com/repos/PyCQA/pyflakes/issues/265/labels{/name}","comments_url":"https://api.github.com/repos/PyCQA/pyflakes/issues/265/comments","events_url":"https://api.github.com/repos/PyCQA/pyflakes/issues/265/events","html_url":"https://github.com/PyCQA/pyflakes/issues/265","id":231870090,"node_id":"MDU6SXNzdWUyMzE4NzAwOTA=","number":265,"title":"erroneous 'undefined name' in exception handling + lambda","user":{"login":"pyflakes-bot","id":28842979,"node_id":"MDQ6VXNlcjI4ODQyOTc5","avatar_url":"https://avatars1.githubusercontent.com/u/28842979?v=4","gravatar_id":"","url":"https://api.github.com/users/pyflakes-bot","html_url":"https://github.com/pyflakes-bot","followers_url":"https://api.github.com/users/pyflakes-bot/followers","following_url":"https://api.github.com/users/pyflakes-bot/following{/other_user}","gists_url":"https://api.github.com/users/pyflakes-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/pyflakes-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyflakes-bot/subscriptions","organizations_url":"https://api.github.com/users/pyflakes-bot/orgs","repos_url":"https://api.github.com/users/pyflakes-bot/repos","events_url":"https://api.github.com/users/pyflakes-bot/events{/privacy}","received_events_url":"https://api.github.com/users/pyflakes-bot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-03T08:49:43Z","updated_at":"2018-10-31T21:12:12Z","closed_at":null,"author_association":"NONE","body":"\n*Original report by [toikarin](https://launchpad.net/~toikarin) (@toikarin?) on [Launchpad](https://bugs.launchpad.net/bugs/1669713):*\n\n------------------------------------\n\n```\n$ cat pyflakes-test.py \ntry:\n    raise Exception(\"test\")\nexcept Exception as e:\n    print(e)\n    x = lambda: e\n    print(x)\n    print(x())\n\n$ pyflakes --version\n1.5.0\n\n$ pyflakes pyflakes-test.py\npyflakes-test.py:5: undefined name 'e'\n\nrunning this with older pyflakes seems to work OK:\n\n$ pyflakes --version\n0.8.1\n\n$ pyflakes pyflakes-test.py && echo $?\n0\n```\n"},"comment":{"url":"https://api.github.com/repos/PyCQA/pyflakes/issues/comments/434849457","html_url":"https://github.com/PyCQA/pyflakes/issues/265#issuecomment-434849457","issue_url":"https://api.github.com/repos/PyCQA/pyflakes/issues/265","id":434849457,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDg0OTQ1Nw==","user":{"login":"asottile","id":1810591,"node_id":"MDQ6VXNlcjE4MTA1OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1810591?v=4","gravatar_id":"","url":"https://api.github.com/users/asottile","html_url":"https://github.com/asottile","followers_url":"https://api.github.com/users/asottile/followers","following_url":"https://api.github.com/users/asottile/following{/other_user}","gists_url":"https://api.github.com/users/asottile/gists{/gist_id}","starred_url":"https://api.github.com/users/asottile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asottile/subscriptions","organizations_url":"https://api.github.com/users/asottile/orgs","repos_url":"https://api.github.com/users/asottile/repos","events_url":"https://api.github.com/users/asottile/events{/privacy}","received_events_url":"https://api.github.com/users/asottile/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T21:12:12Z","updated_at":"2018-10-31T21:12:12Z","author_association":"CONTRIBUTOR","body":"Can confirm this is still a bug:\r\n\r\n```python\r\ntry:\r\n    assert False\r\nexcept Exception as e:\r\n    lambda: e\r\n```\r\n\r\n```console\r\n$ pyflakes --version\r\n2.0.0\r\n$ pyflakes t.py \r\nt.py:3: local variable 'e' is assigned to but never used\r\nt.py:4: undefined name 'e'\r\n```"}}
{"actor":{"display_login":"asottile"}}