You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# pylint: disable=missing-docstringfromtypingimportNoReturndefno_return(exc: Exception) ->NoReturn:
"""This function doesn't return, as shown by type hint of NoReturn."""raiseException("Blows up") fromexcdefreturn_int() ->int:
"""Function that doesn't return upon ValueError."""try:
return5exceptValueErrorasexc:
no_return(exc)
Current behavior
Result of pylint a.py:
a.py:9:0: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
Expected behavior
Since there is not a return during the except case, this pylint error is a false positive.
Steps to reproduce
Given a file
a.py
:Current behavior
Result of
pylint a.py
:Expected behavior
Since there is not a return during the
except
case, this pylint error is a false positive.pylint --version output
Result of
pylint --version
output:The text was updated successfully, but these errors were encountered: