
April 18, 2018
9:43 p.m.
IINM, mypy can catch such things. But that's a different sort of tool of course. On Wed, Apr 18, 2018 at 1:25 PM, Skip Montanaro <skip.montanaro@gmail.com> wrote:
Is there a static checker which will catch multiple return types? Consider this dumb example:
def func(a, b, c): if c: return (a, b) return 0
I thought pylint had a checker for that, but running with --rcfile=/dev/null didn't complain about the different types being returned. Is there perhaps a checker for that which isn't enabled by default? Or another static tool which will catch it?
Thx,
Skip _______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
-- Dan Stromberg