[code-quality] Catching multiple return types

2018-04-18 Thread Skip Montanaro
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 t

Re: [code-quality] Catching multiple return types

2018-04-18 Thread Skip Montanaro
Thanks, good to know. Yet another tool for the kit... S On Wed, Apr 18, 2018, 3:43 PM Dan Stromberg wrote: > > 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 > wrote: > >> Is there a static checker which w

Re: [code-quality] Catching multiple return types

2018-04-18 Thread Dan Stromberg
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 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) >