File: paramspec.pyi

package info (click to toggle)
mypy 1.19.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,412 kB
  • sloc: python: 114,754; ansic: 13,343; cpp: 11,380; makefile: 257; sh: 28
file content (79 lines) | stat: -rw-r--r-- 2,372 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# builtins stub for paramspec-related test cases

import _typeshed
from typing import (
    Sequence, Generic, TypeVar, Iterable, Iterator, Tuple, Mapping, Optional, Union, Type, overload,
    Protocol
)

T = TypeVar("T")
T_co = TypeVar('T_co', covariant=True)
KT = TypeVar("KT")
VT = TypeVar("VT")

class object:
    def __init__(self) -> None: ...

class function: ...
class ellipsis: ...
class classmethod: ...

class type:
    def __init__(self, *a: object) -> None: ...
    def __call__(self, *a: object) -> object: ...

class list(Sequence[T], Generic[T]):
    @overload
    def __getitem__(self, i: int) -> T: ...
    @overload
    def __getitem__(self, s: slice) -> list[T]: ...
    def __contains__(self, item: object) -> bool: ...
    def __iter__(self) -> Iterator[T]: ...

class int:
    def __neg__(self) -> int: ...
    def __add__(self, other: int) -> int: ...

class bool(int): ...
class float: ...
class slice: ...
class str: ...
class bytes: ...

class tuple(Sequence[T_co], Generic[T_co]):
    def __new__(cls: Type[T], iterable: Iterable[T_co] = ...) -> T: ...
    def __iter__(self) -> Iterator[T_co]: ...
    def __contains__(self, item: object) -> bool: ...
    def __getitem__(self, x: int) -> T_co: ...
    def __mul__(self, n: int) -> Tuple[T_co, ...]: ...
    def __rmul__(self, n: int) -> Tuple[T_co, ...]: ...
    def __add__(self, x: Tuple[T_co, ...]) -> Tuple[T_co, ...]: ...
    def __len__(self) -> int: ...
    def count(self, obj: object) -> int: ...

class _ItemsView(Iterable[Tuple[KT, VT]]): ...

class dict(Mapping[KT, VT]):
    @overload
    def __init__(self, **kwargs: VT) -> None: ...
    @overload
    def __init__(self, arg: Iterable[Tuple[KT, VT]], **kwargs: VT) -> None: ...
    def __getitem__(self, key: KT) -> VT: ...
    def __setitem__(self, k: KT, v: VT) -> None: ...
    def __iter__(self) -> Iterator[KT]: ...
    def __contains__(self, item: object) -> int: ...
    def update(self, a: Mapping[KT, VT]) -> None: ...
    @overload
    def get(self, k: KT) -> Optional[VT]: ...
    @overload
    def get(self, k: KT, default: Union[KT, T]) -> Union[VT, T]: ...
    def __len__(self) -> int: ...
    def pop(self, k: KT) -> VT: ...
    def items(self) -> _ItemsView[KT, VT]: ...

def isinstance(x: object, t: type) -> bool: ...

class _Sized(Protocol):
    def __len__(self) -> int: ...

def len(x: _Sized) -> int: ...