{"action":"closed","issue":{"url":"https://api.github.com/repos/coala-analyzer/coala-bears/issues/750","repository_url":"https://api.github.com/repos/coala-analyzer/coala-bears","labels_url":"https://api.github.com/repos/coala-analyzer/coala-bears/issues/750/labels{/name}","comments_url":"https://api.github.com/repos/coala-analyzer/coala-bears/issues/750/comments","events_url":"https://api.github.com/repos/coala-analyzer/coala-bears/issues/750/events","html_url":"https://github.com/coala-analyzer/coala-bears/issues/750","id":174327481,"number":750,"title":"YapfBear: Catch errors and make a result","user":{"login":"underyx","id":1060436,"avatar_url":"https://avatars.githubusercontent.com/u/1060436?v=3","gravatar_id":"","url":"https://api.github.com/users/underyx","html_url":"https://github.com/underyx","followers_url":"https://api.github.com/users/underyx/followers","following_url":"https://api.github.com/users/underyx/following{/other_user}","gists_url":"https://api.github.com/users/underyx/gists{/gist_id}","starred_url":"https://api.github.com/users/underyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/underyx/subscriptions","organizations_url":"https://api.github.com/users/underyx/orgs","repos_url":"https://api.github.com/users/underyx/repos","events_url":"https://api.github.com/users/underyx/events{/privacy}","received_events_url":"https://api.github.com/users/underyx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/coala-analyzer/coala-bears/labels/area/lintbears","name":"area/lintbears","color":"fbca04"},{"url":"https://api.github.com/repos/coala-analyzer/coala-bears/labels/type/bug","name":"type/bug","color":"e11d21"},{"url":"https://api.github.com/repos/coala-analyzer/coala-bears/labels/type/feature","name":"type/feature","color":"0052cc"}],"state":"closed","locked":false,"assignee":{"login":"AbdealiJK","id":2200743,"avatar_url":"https://avatars.githubusercontent.com/u/2200743?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdealiJK","html_url":"https://github.com/AbdealiJK","followers_url":"https://api.github.com/users/AbdealiJK/followers","following_url":"https://api.github.com/users/AbdealiJK/following{/other_user}","gists_url":"https://api.github.com/users/AbdealiJK/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdealiJK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdealiJK/subscriptions","organizations_url":"https://api.github.com/users/AbdealiJK/orgs","repos_url":"https://api.github.com/users/AbdealiJK/repos","events_url":"https://api.github.com/users/AbdealiJK/events{/privacy}","received_events_url":"https://api.github.com/users/AbdealiJK/received_events","type":"User","site_admin":false},"assignees":[{"login":"AbdealiJK","id":2200743,"avatar_url":"https://avatars.githubusercontent.com/u/2200743?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdealiJK","html_url":"https://github.com/AbdealiJK","followers_url":"https://api.github.com/users/AbdealiJK/followers","following_url":"https://api.github.com/users/AbdealiJK/following{/other_user}","gists_url":"https://api.github.com/users/AbdealiJK/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdealiJK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdealiJK/subscriptions","organizations_url":"https://api.github.com/users/AbdealiJK/orgs","repos_url":"https://api.github.com/users/AbdealiJK/repos","events_url":"https://api.github.com/users/AbdealiJK/events{/privacy}","received_events_url":"https://api.github.com/users/AbdealiJK/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2016-08-31T17:07:24Z","updated_at":"2016-09-03T16:46:48Z","closed_at":"2016-09-03T16:46:48Z","body":"When trying this test case: `self.check_validity(self.uut, ['async def x():\\n', '0\\n'], valid=True)`\r\n\r\nI got a traceback:\r\n```\r\nBear YapfBear failed to run. Take a look at debug messages (`-L DEBUG`) for further information.\r\nThe bear YapfBear raised an exception. If you are the writer of this bear, please make sure to catch all exceptions. If not and this error annoys you, you might want to get in contact with the writer of this bear.\r\n\r\nTraceback information is provided below:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/site-packages/yapf/yapflib/pytree_utils.py\", line 101, in ParseCodeToTree\r\n    tree = parser_driver.parse_string(code, debug=False)\r\n  File \"/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib2to3/pgen2/driver.py\", line 106, in parse_string\r\n    return self.parse_tokens(tokens, debug)\r\n  File \"/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib2to3/pgen2/driver.py\", line 71, in parse_tokens\r\n    if p.addtoken(type, value, (prefix, start)):\r\n  File \"/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib2to3/pgen2/parse.py\", line 159, in addtoken\r\n    raise ParseError(\"bad input\", type, value, context)\r\nlib2to3.pgen2.parse.ParseError: bad input: type=2, value='0', context=('', (2, 0))\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/site-packages/yapf/yapflib/pytree_utils.py\", line 107, in ParseCodeToTree\r\n    tree = parser_driver.parse_string(code, debug=False)\r\n  File \"/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib2to3/pgen2/driver.py\", line 106, in parse_string\r\n    return self.parse_tokens(tokens, debug)\r\n  File \"/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib2to3/pgen2/driver.py\", line 71, in parse_tokens\r\n    if p.addtoken(type, value, (prefix, start)):\r\n  File \"/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib2to3/pgen2/parse.py\", line 159, in addtoken\r\n    raise ParseError(\"bad input\", type, value, context)\r\nlib2to3.pgen2.parse.ParseError: bad input: type=2, value='0', context=('', (2, 0))\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/site-packages/coalib/bears/Bear.py\", line 250, in execute\r\n    return [] if result is None else list(result)\r\n  File \"/Users/underyx/coala-bears/bears/python/YapfBear.py\", line 146, in run\r\n    verify=False)[0].splitlines(True)\r\n  File \"/usr/local/lib/python3.5/site-packages/yapf/yapflib/yapf_api.py\", line 90, in FormatFile\r\n    verify=verify)\r\n  File \"/usr/local/lib/python3.5/site-packages/yapf/yapflib/yapf_api.py\", line 123, in FormatCode\r\n    tree = pytree_utils.ParseCodeToTree(unformatted_source)\r\n  File \"/usr/local/lib/python3.5/site-packages/yapf/yapflib/pytree_utils.py\", line 113, in ParseCodeToTree\r\n    raise e\r\n  File \"/usr/local/lib/python3.5/site-packages/yapf/yapflib/pytree_utils.py\", line 111, in ParseCodeToTree\r\n    ast.parse(code)\r\n  File \"/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ast.py\", line 35, in parse\r\n    return compile(source, filename, mode, PyCF_ONLY_AST)\r\n  File \"<unknown>\", line 2\r\n    0\r\n    ^\r\nIndentationError: expected an indented block\r\n```"}}
{"actor":{"display_login":"rultor"}}