mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
validator.instance_of can contain sequence of types (#1920)
This commit is contained in:
committed by
Jelle Zijlstra
parent
50c7188300
commit
1fe9fd83fa
4
third_party/2and3/attr/validators.pyi
vendored
4
third_party/2and3/attr/validators.pyi
vendored
@@ -1,9 +1,9 @@
|
||||
from typing import Container, List, Union, TypeVar, Type, Any, Optional
|
||||
from typing import Container, List, Union, TypeVar, Type, Any, Optional, Tuple
|
||||
from . import _ValidatorType
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
def instance_of(type: Type[_T]) -> _ValidatorType[_T]: ...
|
||||
def instance_of(type: Union[Tuple[Type[_T], ...], Type[_T]]) -> _ValidatorType[_T]: ...
|
||||
def provides(interface: Any) -> _ValidatorType[Any]: ...
|
||||
def optional(validator: Union[_ValidatorType[_T], List[_ValidatorType[_T]]]) -> _ValidatorType[Optional[_T]]: ...
|
||||
def in_(options: Container[_T]) -> _ValidatorType[_T]: ...
|
||||
|
||||
Reference in New Issue
Block a user