File: enum.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 (25 lines) | stat: -rw-r--r-- 572 bytes parent folder | download
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
# Minimal set of builtins required to work with Enums
from typing import TypeVar, Generic, Iterator, Sequence, overload, Iterable

T = TypeVar('T')

class object:
    def __init__(self): pass

class type: pass
class tuple(Generic[T]):
    def __getitem__(self, x: int) -> T: pass

class int: pass
class str:
    def __len__(self) -> int: pass
    def __iter__(self) -> Iterator[str]: pass

class dict: pass
class ellipsis: pass

class list(Sequence[T]):
    @overload
    def __init__(self) -> None: pass
    @overload
    def __init__(self, x: Iterable[T]) -> None: pass