{"action":"closed","issue":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/2208","repository_url":"https://api.github.com/repos/PyCQA/pylint","labels_url":"https://api.github.com/repos/PyCQA/pylint/issues/2208/labels{/name}","comments_url":"https://api.github.com/repos/PyCQA/pylint/issues/2208/comments","events_url":"https://api.github.com/repos/PyCQA/pylint/issues/2208/events","html_url":"https://github.com/PyCQA/pylint/issues/2208","id":333874249,"node_id":"MDU6SXNzdWUzMzM4NzQyNDk=","number":2208,"title":"New check: useless-pass","user":{"login":"nickdrozd","id":17630138,"node_id":"MDQ6VXNlcjE3NjMwMTM4","avatar_url":"https://avatars1.githubusercontent.com/u/17630138?v=4","gravatar_id":"","url":"https://api.github.com/users/nickdrozd","html_url":"https://github.com/nickdrozd","followers_url":"https://api.github.com/users/nickdrozd/followers","following_url":"https://api.github.com/users/nickdrozd/following{/other_user}","gists_url":"https://api.github.com/users/nickdrozd/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdrozd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdrozd/subscriptions","organizations_url":"https://api.github.com/users/nickdrozd/orgs","repos_url":"https://api.github.com/users/nickdrozd/repos","events_url":"https://api.github.com/users/nickdrozd/events{/privacy}","received_events_url":"https://api.github.com/users/nickdrozd/received_events","type":"User","site_admin":false},"labels":[{"id":297362519,"node_id":"MDU6TGFiZWwyOTczNjI1MTk=","url":"https://api.github.com/repos/PyCQA/pylint/labels/checkers","name":"checkers","color":"ededed","default":false},{"id":297274517,"node_id":"MDU6TGFiZWwyOTcyNzQ1MTc=","url":"https://api.github.com/repos/PyCQA/pylint/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":534286816,"node_id":"MDU6TGFiZWw1MzQyODY4MTY=","url":"https://api.github.com/repos/PyCQA/pylint/labels/work%20in%20progress","name":"work in progress","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-19T23:30:23Z","updated_at":"2018-08-09T07:13:24Z","closed_at":"2018-08-09T07:13:24Z","author_association":"CONTRIBUTOR","body":"```\r\ndef docstring_only():\r\n    '''In Python, stubbed functions often have a body that contains just a\r\n    single `pass` statement, indicating that the function doesn't do\r\n    anything. However, a stubbed function can also have just a\r\n    docstring, and function with a docstring and no body also does\r\n    nothing.\r\n    '''\r\n\r\n\r\n# This function has no docstring, so it needs a `pass` statement.\r\ndef pass_only():\r\n    pass\r\n\r\n\r\ndef docstring_and_pass():\r\n    '''This function doesn't do anything, but it has a docstring, so its\r\n    `pass` statement is useless clutter.\r\n\r\n    NEW CHECK: useless-pass\r\n\r\n    This would check for stubs with both docstrings and `pass`\r\n    statements, suggesting the removal of the useless `pass`\r\n    statements\r\n    '''\r\n    pass\r\n\r\n\r\nclass DocstringOnly:\r\n    '''The same goes for class stubs: docstring, or `pass`, but not both.\r\n    '''\r\n\r\n\r\n# No problem\r\nclass PassOnly:\r\n    pass\r\n\r\n\r\nclass DocstringAndPass:\r\n    '''Whoops! Mark this one as bad too.\r\n    '''\r\n    pass\r\n\r\n\r\ndocstring_only()\r\npass_only()\r\ndocstring_and_pass()\r\n\r\na = DocstringOnly()\r\nb = PassOnly()\r\nc = DocstringAndPass()\r\n```"}}
{"actor":{"display_login":"sushobhit27"}}