mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Make callable() return TypeGuard (#6274)
This commit is contained in:
@@ -60,7 +60,7 @@ from typing import (
|
||||
ValuesView,
|
||||
overload,
|
||||
)
|
||||
from typing_extensions import Literal, SupportsIndex, final
|
||||
from typing_extensions import Literal, SupportsIndex, TypeGuard, final
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
@@ -976,7 +976,7 @@ def bin(__number: int | SupportsIndex) -> str: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def breakpoint(*args: Any, **kws: Any) -> None: ...
|
||||
|
||||
def callable(__obj: object) -> bool: ...
|
||||
def callable(__obj: object) -> TypeGuard[Callable[..., object]]: ...
|
||||
def chr(__i: int) -> str: ...
|
||||
|
||||
# We define this here instead of using os.PathLike to avoid import cycle issues.
|
||||
|
||||
Reference in New Issue
Block a user