{"action":"created","issue":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/2618","repository_url":"https://api.github.com/repos/PyCQA/pylint","labels_url":"https://api.github.com/repos/PyCQA/pylint/issues/2618/labels{/name}","comments_url":"https://api.github.com/repos/PyCQA/pylint/issues/2618/comments","events_url":"https://api.github.com/repos/PyCQA/pylint/issues/2618/events","html_url":"https://github.com/PyCQA/pylint/pull/2618","id":385565696,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NTA1Njgx","number":2618,"title":"Fix incorrect generation of ``no-else-raise`` warnings (R1705)","user":{"login":"jrobertson98atx","id":45413853,"node_id":"MDQ6VXNlcjQ1NDEzODUz","avatar_url":"https://avatars3.githubusercontent.com/u/45413853?v=4","gravatar_id":"","url":"https://api.github.com/users/jrobertson98atx","html_url":"https://github.com/jrobertson98atx","followers_url":"https://api.github.com/users/jrobertson98atx/followers","following_url":"https://api.github.com/users/jrobertson98atx/following{/other_user}","gists_url":"https://api.github.com/users/jrobertson98atx/gists{/gist_id}","starred_url":"https://api.github.com/users/jrobertson98atx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrobertson98atx/subscriptions","organizations_url":"https://api.github.com/users/jrobertson98atx/orgs","repos_url":"https://api.github.com/users/jrobertson98atx/repos","events_url":"https://api.github.com/users/jrobertson98atx/events{/privacy}","received_events_url":"https://api.github.com/users/jrobertson98atx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-29T04:30:01Z","updated_at":"2018-11-29T22:52:51Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/PyCQA/pylint/pulls/2618","html_url":"https://github.com/PyCQA/pylint/pull/2618","diff_url":"https://github.com/PyCQA/pylint/pull/2618.diff","patch_url":"https://github.com/PyCQA/pylint/pull/2618.patch"},"body":"<!--\r\n\r\nThank you for submitting a PR to pylint!\r\n\r\nTo ease the process of reviewing your PR, do make sure to complete the following boxes.\r\n\r\nYou can also read more about contributing to pylint in this document:\r\nhttps://github.com/PyCQA/pylint/blob/master/doc/development_guide/contribute.rst#repository\r\n-->\r\n\r\n## Steps\r\n\r\n- [x] Add yourself to CONTRIBUTORS if you are a new contributor.\r\n- [x] Add a ChangeLog entry describing what your PR does.\r\n- [x] Write a good description on what the PR does.\r\n\r\n## Description\r\nWhile trying to understand how no-else-return worked, I found some issues whereby nested if statements didn't always work.  In some cases there were no-else-return conditions that weren't flagged, and in others there were no-else-conditions that were incorrectly flagged.\r\n\r\nThe main change is the remove of the recursion in pylint/checkers/refactoring.py that checked for the no-else-return condition as it didn't seem to work correctly and wasn't ultimately needed, at least with the testing I did.\r\n\r\nI've changed the passing criteria for some tests to reflect the new code behavior, and added new tests for the other cases that seemed erroneous.  I also fixed the pylint sources that started getting flagged with no-else-return after my changes.\r\n\r\n## Type of Changes\r\n<!-- Leave the corresponding lines for the applicable type of change: -->\r\n|   | Type |\r\n| ------------- | ------------- |\r\n| ✓  | :bug: Bug fix  |\r\n\r\n## Related Issue\r\n\r\n<!-- \r\nIf this PR fixes a particular issue, use the following to automatically close that issue\r\nonce this PR gets merged:\r\n\r\nCloses #XXX \r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/comments/443024104","html_url":"https://github.com/PyCQA/pylint/pull/2618#issuecomment-443024104","issue_url":"https://api.github.com/repos/PyCQA/pylint/issues/2618","id":443024104,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzAyNDEwNA==","user":{"login":"jrobertson98atx","id":45413853,"node_id":"MDQ6VXNlcjQ1NDEzODUz","avatar_url":"https://avatars3.githubusercontent.com/u/45413853?v=4","gravatar_id":"","url":"https://api.github.com/users/jrobertson98atx","html_url":"https://github.com/jrobertson98atx","followers_url":"https://api.github.com/users/jrobertson98atx/followers","following_url":"https://api.github.com/users/jrobertson98atx/following{/other_user}","gists_url":"https://api.github.com/users/jrobertson98atx/gists{/gist_id}","starred_url":"https://api.github.com/users/jrobertson98atx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrobertson98atx/subscriptions","organizations_url":"https://api.github.com/users/jrobertson98atx/orgs","repos_url":"https://api.github.com/users/jrobertson98atx/repos","events_url":"https://api.github.com/users/jrobertson98atx/events{/privacy}","received_events_url":"https://api.github.com/users/jrobertson98atx/received_events","type":"User","site_admin":false},"created_at":"2018-11-29T22:52:51Z","updated_at":"2018-11-29T22:52:51Z","author_association":"NONE","body":"I've pushed  fix for the original failures; while cleaning up new instances of no-else-return I mistakenly removed a necessary return statement.  The tests originally failing are now passing.\r\n\r\nThe new failure is for test 'regression_1326_crash_uninferable', and it doesn't seem to be related to my change as I see the same failures on master in a fresh clone of the repository.\r\n"}}
{"actor":{"display_login":"jrobertson98atx"}}