diff --git a/crates/pyrefly_bundled/third_party/typeshed/stdlib/builtins.pyi b/crates/pyrefly_bundled/third_party/typeshed/stdlib/builtins.pyi index 862ec9227b..26291d1357 100644 --- a/crates/pyrefly_bundled/third_party/typeshed/stdlib/builtins.pyi +++ b/crates/pyrefly_bundled/third_party/typeshed/stdlib/builtins.pyi @@ -4099,7 +4099,7 @@ def breakpoint(*args: Any, **kws: Any) -> None: By default, this drops you into the pdb debugger. """ ... -def callable(obj: object, /) -> TypeIs[Callable[..., object]]: +def callable(obj: object, /) -> TypeIs[Callable[..., Any]]: """ Return whether the object is callable (i.e., some kind of function). diff --git a/pyrefly/lib/test/callable.rs b/pyrefly/lib/test/callable.rs index 34e32c396f..1c4367742e 100644 --- a/pyrefly/lib/test/callable.rs +++ b/pyrefly/lib/test/callable.rs @@ -1098,6 +1098,16 @@ def f( "#, ); +testcase!( + test_assert_callable_narrow_any, + r#" +from typing import Any, assert_type +def f(x: object): + assert callable(x) + assert_type(x(), Any) + "#, +); + testcase!( test_narrow_union, r#"