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
{{ message }}
Repository navigation
(馃悶) overlapping Callables are incorrectly joined into builtins.function聽#17479
fromtypingimportCallable, _TasTdefjoin(t1: T, t2: T) ->T: ...
deff1() ->None: ...
deff2(i: int=0) ->None: ...
fn: Callable[[], None] =join(f1, f2) # Incompatible types in assignment (expression has type "function", variable has type "Callable[[], None]") [assignment]
f2 is a valid () -> None, this code should not produce any problems
if there is any concern that this is a duplicate of #17478, the difference is that this scenario is: join( () -> None, (int=) -> None )
and #17479 is join( () -> None, (int) -> None )
Activity
Improve CallableType join in simple cases
Improve CallableType join in simple cases (python#18406)