mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
add stub for stdlib abc.ABC in python 3.4+ (issue #304)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
import sys
|
||||
# Stubs for abc.
|
||||
|
||||
# Thesee definitions have special processing in type checker.
|
||||
@@ -6,3 +7,7 @@ class ABCMeta:
|
||||
def register(cls: "ABCMeta", subclass: Any) -> None: ...
|
||||
abstractmethod = object()
|
||||
abstractproperty = object()
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
class ABC(metaclass=ABCMeta):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user