Closed
Description
Bug description
This snippet returns in the except
block, and therefore the else
is unnecessary:
def f() -> bool:
try:
print('asdf')
except: # pylint: disable = bare-except
return False
else:
return True
It should raise no-else-return
.
Configuration
No response
Command used
`pylint asdf.py`
Pylint output
No warnings raised
Expected behavior
Should raise no-else-return
Pylint version
pylint 2.16.0-dev
astroid 2.13.0-dev0
Python 3.8.10 (default, Mar 15 2022, 12:22:08)