Skip to content

Commit bfeed59

Browse files
committed
Add typing.ClassVar (fixes python#888)
1 parent 6d1edb2 commit bfeed59

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎stdlib/2/typing.pyi‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Stubs for typing (Python 2.7)
22

3+
import sys
34
from abc import abstractmethod, ABCMeta
45

56
# Definitions of special type checking related constructs. Their definition
@@ -14,6 +15,9 @@ Callable = object()
1415
Type = object()
1516
_promote = object()
1617

18+
if sys.version_info >= (3, 5):
19+
ClassVar = object()
20+
1721
class GenericMeta(type): ...
1822

1923
# Type aliases

‎stdlib/3/typing.pyi‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ Type = object()
1616
_promote = object()
1717
no_type_check = object()
1818

19+
if sys.version_info >= (3, 5):
20+
ClassVar = object()
21+
1922
class GenericMeta(type): ...
2023

2124
# Type aliases and type constructors

0 commit comments

Comments
 (0)