FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
typeshed/stdlib/abc.pyi at main · python/typeshed · GitHub
python
typeshed
Repository navigation
Code
Issues
208
(208)
Pull requests
212
(212)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
typeshed
/
stdlib
/
abc.pyi
Copy path
More file actions
More file actions
Latest commit
History
History
History
50 lines (41 loc) · 2.04 KB
Breadcrumbs
typeshed
/
stdlib
/
abc.pyi
Copy path
File metadata and controls
50 lines (41 loc) · 2.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import
_typeshed
import
sys
from
_typeshed
import
SupportsWrite
from
collections
.
abc
import
Callable
from
typing
import
Any
,
Concatenate
,
Literal
,
ParamSpec
,
TypeVar
from
typing_extensions
import
deprecated
_T
=
TypeVar
(
"_T"
)
_R_co
=
TypeVar
(
"_R_co"
,
covariant
=
True
)
_FuncT
=
TypeVar
(
"_FuncT"
,
bound
=
Callable
[...,
Any
])
_P
=
ParamSpec
(
"_P"
)
# These definitions have special processing in mypy
class
ABCMeta
(
type
):
__abstractmethods__
:
frozenset
[
str
]
if
sys
.
version_info
>=
(
3
,
11
):
def
__new__
(
mcls
:
type
[
_typeshed
.
Self
],
name
:
str
,
bases
:
tuple
[
type
, ...],
namespace
:
dict
[
str
,
Any
],
/
,
**
kwargs
:
Any
)
->
_typeshed
.
Self
: ...
else
:
def
__new__
(
mcls
:
type
[
_typeshed
.
Self
],
name
:
str
,
bases
:
tuple
[
type
, ...],
namespace
:
dict
[
str
,
Any
],
**
kwargs
:
Any
)
->
_typeshed
.
Self
: ...
def
__instancecheck__
(
cls
:
ABCMeta
,
instance
:
Any
,
/
)
->
bool
: ...
def
__subclasscheck__
(
cls
:
ABCMeta
,
subclass
:
type
,
/
)
->
bool
: ...
def
_dump_registry
(
cls
:
ABCMeta
,
file
:
SupportsWrite
[
str
]
|
None
=
None
)
->
None
: ...
def
register
(
cls
:
ABCMeta
,
subclass
:
type
[
_T
])
->
type
[
_T
]: ...
def
abstractmethod
(
funcobj
:
_FuncT
)
->
_FuncT
: ...
@
deprecated
(
"Deprecated since Python 3.3. Use `@classmethod` stacked on top of `@abstractmethod` instead."
)
class
abstractclassmethod
(
classmethod
[
_T
,
_P
,
_R_co
]):
__isabstractmethod__
:
Literal
[
True
]
def
__init__
(
self
,
callable
:
Callable
[
Concatenate
[
type
[
_T
],
_P
],
_R_co
])
->
None
: ...
@
deprecated
(
"Deprecated since Python 3.3. Use `@staticmethod` stacked on top of `@abstractmethod` instead."
)
class
abstractstaticmethod
(
staticmethod
[
_P
,
_R_co
]):
__isabstractmethod__
:
Literal
[
True
]
def
__init__
(
self
,
callable
:
Callable
[
_P
,
_R_co
])
->
None
: ...
@
deprecated
(
"Deprecated since Python 3.3. Use `@property` stacked on top of `@abstractmethod` instead."
)
class
abstractproperty
(
property
):
__isabstractmethod__
:
Literal
[
True
]
class
ABC
(
metaclass
=
ABCMeta
):
__slots__
=
()
def
get_cache_token
()
->
object
: ...
def
update_abstractmethods
(
cls
:
type
[
_T
])
->
type
[
_T
]: ...
Back
|
FazBrowse Home
|
New Git URL