{"action":"closed","issue":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/1824","repository_url":"https://api.github.com/repos/PyCQA/pylint","labels_url":"https://api.github.com/repos/PyCQA/pylint/issues/1824/labels{/name}","comments_url":"https://api.github.com/repos/PyCQA/pylint/issues/1824/comments","events_url":"https://api.github.com/repos/PyCQA/pylint/issues/1824/events","html_url":"https://github.com/PyCQA/pylint/issues/1824","id":286336463,"number":1824,"title":"Unexpected undefined-variable error in lambda functions","user":{"login":"davidjlloyd","id":34747193,"avatar_url":"https://avatars2.githubusercontent.com/u/34747193?v=4","gravatar_id":"","url":"https://api.github.com/users/davidjlloyd","html_url":"https://github.com/davidjlloyd","followers_url":"https://api.github.com/users/davidjlloyd/followers","following_url":"https://api.github.com/users/davidjlloyd/following{/other_user}","gists_url":"https://api.github.com/users/davidjlloyd/gists{/gist_id}","starred_url":"https://api.github.com/users/davidjlloyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidjlloyd/subscriptions","organizations_url":"https://api.github.com/users/davidjlloyd/orgs","repos_url":"https://api.github.com/users/davidjlloyd/repos","events_url":"https://api.github.com/users/davidjlloyd/events{/privacy}","received_events_url":"https://api.github.com/users/davidjlloyd/received_events","type":"User","site_admin":false},"labels":[{"id":297274515,"url":"https://api.github.com/repos/PyCQA/pylint/labels/bug","name":"bug","color":"ea9896","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-01-05T16:26:03Z","updated_at":"2018-03-03T04:56:04Z","closed_at":"2018-03-03T04:56:04Z","author_association":"NONE","body":"### Steps to reproduce\r\n\r\nCreate a file `test.py` and add the following to it.\r\n\r\n```python\r\nclass MyObject(object):\r\n\tmethod1 = lambda function: function()\r\n\tmethod2 = lambda func: func()\r\n```\r\n\r\nRun pylint against the file.\r\n\r\n### Current behavior\r\n\r\nThe variable name `function` is considered undefined in `method1` but `func` in `method2` is fine! Pylint produces the following output:\r\n\r\n```\r\nE:  2,28: Undefined variable 'function' (undefined-variable)\r\nR:  1, 0: Too few public methods (0/1) (too-few-public-methods)\r\n```\r\n\r\n### Expected behavior\r\n\r\nNo undefined variable errors.\r\n\r\n### pylint --version output\r\n\r\npylint 1.7.1, \r\nastroid 1.5.3\r\nPython 2.7.12 (default, Nov 20 2017, 18:23:56) \r\n[GCC 5.4.0 20160609]"}}
{"actor":{"display_login":"brycepg"}}