10000 Different approach to defining Type in typing.pyi. · python/typeshed@64e9a0f · GitHub
[go: up one dir, main page]

Skip to content

Commit 64e9a0f

Browse files
author
Guido van Rossum
committed
Different approach to defining Type in typing.pyi.
1 parent 99e1083 commit 64e9a0f

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

stdlib/2.7/typing.pyi

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ TypeVar = object()
1212
Generic = object()
1313
Tuple = object()
1414
Callable = object()
15+
Type = object()
1516
builtinclass = object()
1617
_promote = object()
1718
NamedTuple = object()
@@ -184,10 +185,6 @@ class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]):
184185
@overload
185186
def update(self, m: Iterable[Tuple[_KT, _VT]]) -> None: ...
186187

187-
CT = TypeVar('CT', covariant=True, bound=type)
188-
class Type(type, Generic[CT]):
189-
pass
190-
191188
Text = unicode
192189

193190
class IO(Iterable[AnyStr], Generic[AnyStr]):

stdlib/3/typing.pyi

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ TypeVar = object()
1212
Generic = object()
1313
Tuple = object()
1414
Callable = object()
15+
Type = object()
1516
builtinclass = object()
1617
_promote = object()
1718
NamedTuple = object()
@@ -251,10 +252,6 @@ class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]):
251252
@overload
252253
def update(self, m: Iterable[Tuple[_KT, _VT]]) -> None: ...
253254

254-
CT = TypeVar('CT', covariant=True, bound=type)
255-
class Type(type, Generic[CT]):
256-
pass
257-
258255
Text = str
259256

260257
class IO(Iterable[AnyStr], Generic[AnyStr]):

0 commit comments

Comments
 (0)
0