mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Change annotation of 'function' in Timer.__init__ from Callable[..., None] to Callable[..., Any] (#3788)
The return value is ignored, but calling a function with a return value should still be valid. Closes: #3782
This commit is contained in:
@@ -173,11 +173,11 @@ if sys.version_info >= (3, 8):
|
||||
|
||||
class Timer(Thread):
|
||||
if sys.version_info >= (3,):
|
||||
def __init__(self, interval: float, function: Callable[..., None],
|
||||
def __init__(self, interval: float, function: Callable[..., Any],
|
||||
args: Optional[Iterable[Any]] = ...,
|
||||
kwargs: Optional[Mapping[str, Any]] = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, interval: float, function: Callable[..., None],
|
||||
def __init__(self, interval: float, function: Callable[..., Any],
|
||||
args: Iterable[Any] = ...,
|
||||
kwargs: Mapping[str, Any] = ...) -> None: ...
|
||||
def cancel(self) -> None: ...
|
||||
|
||||
@@ -173,11 +173,11 @@ if sys.version_info >= (3, 8):
|
||||
|
||||
class Timer(Thread):
|
||||
if sys.version_info >= (3,):
|
||||
def __init__(self, interval: float, function: Callable[..., None],
|
||||
def __init__(self, interval: float, function: Callable[..., Any],
|
||||
args: Optional[Iterable[Any]] = ...,
|
||||
kwargs: Optional[Mapping[str, Any]] = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, interval: float, function: Callable[..., None],
|
||||
def __init__(self, interval: float, function: Callable[..., Any],
|
||||
args: Iterable[Any] = ...,
|
||||
kwargs: Mapping[str, Any] = ...) -> None: ...
|
||||
def cancel(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user