type vars/base.py
This commit is contained in:
parent
7a986695c5
commit
598a500c7c
@ -1550,7 +1550,7 @@ def figure_out_type(value: Any) -> types.GenericType:
|
||||
class cached_property_no_lock(functools.cached_property):
|
||||
"""A special version of functools.cached_property that does not use a lock."""
|
||||
|
||||
def __init__(self, func):
|
||||
def __init__(self, func: Callable):
|
||||
"""Initialize the cached_property_no_lock.
|
||||
|
||||
Args:
|
||||
@ -2905,41 +2905,41 @@ class Field(Generic[T]):
|
||||
"""
|
||||
|
||||
@overload
|
||||
def __get__(self: Field[bool], instance: None, owner) -> BooleanVar: ...
|
||||
def __get__(self: Field[bool], instance: None, owner: Any) -> BooleanVar: ...
|
||||
|
||||
@overload
|
||||
def __get__(self: Field[int], instance: None, owner) -> NumberVar: ...
|
||||
def __get__(self: Field[int], instance: None, owner: Any) -> NumberVar: ...
|
||||
|
||||
@overload
|
||||
def __get__(self: Field[str], instance: None, owner) -> StringVar: ...
|
||||
def __get__(self: Field[str], instance: None, owner: Any) -> StringVar: ...
|
||||
|
||||
@overload
|
||||
def __get__(self: Field[None], instance: None, owner) -> NoneVar: ...
|
||||
def __get__(self: Field[None], instance: None, owner: Any) -> NoneVar: ...
|
||||
|
||||
@overload
|
||||
def __get__(
|
||||
self: Field[List[V]] | Field[Set[V]] | Field[Tuple[V, ...]],
|
||||
instance: None,
|
||||
owner,
|
||||
owner: Any,
|
||||
) -> ArrayVar[List[V]]: ...
|
||||
|
||||
@overload
|
||||
def __get__(
|
||||
self: Field[Dict[str, V]], instance: None, owner
|
||||
self: Field[Dict[str, V]], instance: None, owner: Any
|
||||
) -> ObjectVar[Dict[str, V]]: ...
|
||||
|
||||
@overload
|
||||
def __get__(
|
||||
self: Field[BASE_TYPE], instance: None, owner
|
||||
self: Field[BASE_TYPE], instance: None, owner: Any
|
||||
) -> ObjectVar[BASE_TYPE]: ...
|
||||
|
||||
@overload
|
||||
def __get__(self, instance: None, owner) -> Var[T]: ...
|
||||
def __get__(self, instance: None, owner: Any) -> Var[T]: ...
|
||||
|
||||
@overload
|
||||
def __get__(self, instance, owner) -> T: ...
|
||||
def __get__(self, instance: Any, owner: Any) -> T: ...
|
||||
|
||||
def __get__(self, instance, owner): # type: ignore
|
||||
def __get__(self, instance: Any, owner: Any): # type: ignore
|
||||
"""Get the Var.
|
||||
|
||||
Args:
|
||||
|
Loading…
Reference in New Issue
Block a user