basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

Call to incomplete function could be optimized to only account for the parameters being passed

Open KotlinIsland opened this issue 3 years ago • 3 comments

def foo(a: int, b=...) -> None: ...

foo(1)  # error: call to incomplete function

This error isn't really needed because no untyped parameters are being passed

Workaround

Type the unused parameter as Never

KotlinIsland avatar Jun 21 '22 06:06 KotlinIsland

what about its return type? besides i think it's sus to call untyped functions regardless of if you are actually providing any of the parameters, imo it should still show an error

DetachHead avatar Jun 21 '22 08:06 DetachHead

Maybe that's a bad egg

KotlinIsland avatar Jun 21 '22 08:06 KotlinIsland

Seeing as the main motivation for this feature is to not accidentally call partially inferred functions, this would be very low priority, if we even want it at all.

KotlinIsland avatar Jun 22 '22 01:06 KotlinIsland