mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Corrects timeout type annotations. (#1639)
Timeouts should be floats, but were ints for some reason.
This commit is contained in:
@@ -35,7 +35,7 @@ def setprofile(func: _PF) -> None: ...
|
||||
def stack_size(size: int = ...) -> int: ...
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
TIMEOUT_MAX = ... # type: int
|
||||
TIMEOUT_MAX = ... # type: float
|
||||
|
||||
class ThreadError(Exception): ...
|
||||
|
||||
@@ -86,7 +86,7 @@ class Lock:
|
||||
exc_val: Optional[Exception],
|
||||
exc_tb: Optional[TracebackType]) -> bool: ...
|
||||
if sys.version_info >= (3,):
|
||||
def acquire(self, blocking: bool = ..., timeout: int = ...) -> bool: ...
|
||||
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
||||
else:
|
||||
def acquire(self, blocking: bool = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
@@ -100,7 +100,7 @@ class _RLock:
|
||||
exc_val: Optional[Exception],
|
||||
exc_tb: Optional[TracebackType]) -> bool: ...
|
||||
if sys.version_info >= (3,):
|
||||
def acquire(self, blocking: bool = ..., timeout: int = ...) -> bool: ...
|
||||
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
||||
else:
|
||||
def acquire(self, blocking: bool = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
@@ -116,7 +116,7 @@ class Condition:
|
||||
exc_val: Optional[Exception],
|
||||
exc_tb: Optional[TracebackType]) -> bool: ...
|
||||
if sys.version_info >= (3,):
|
||||
def acquire(self, blocking: bool = ..., timeout: int = ...) -> bool: ...
|
||||
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
||||
else:
|
||||
def acquire(self, blocking: bool = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
@@ -136,7 +136,7 @@ class Semaphore:
|
||||
exc_val: Optional[Exception],
|
||||
exc_tb: Optional[TracebackType]) -> bool: ...
|
||||
if sys.version_info >= (3,):
|
||||
def acquire(self, blocking: bool = ..., timeout: int = ...) -> bool: ...
|
||||
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
||||
else:
|
||||
def acquire(self, blocking: bool = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
@@ -148,7 +148,7 @@ class BoundedSemaphore:
|
||||
exc_val: Optional[Exception],
|
||||
exc_tb: Optional[TracebackType]) -> bool: ...
|
||||
if sys.version_info >= (3,):
|
||||
def acquire(self, blocking: bool = ..., timeout: int = ...) -> bool: ...
|
||||
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
||||
else:
|
||||
def acquire(self, blocking: bool = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user