Enable --disallow-any-generics for stubs (#3288)

This commit is contained in:
Sebastian Rittau
2019-10-01 14:31:34 +02:00
committed by Jelle Zijlstra
parent 23b353303b
commit c32e1e2280
77 changed files with 386 additions and 329 deletions

View File

@@ -52,8 +52,7 @@ def isgetsetdescriptor(object: object) -> bool: ...
def ismemberdescriptor(object: object) -> bool: ...
# Retrieving source code
_SourceObjectType = Union[ModuleType, Type, MethodType, FunctionType,
TracebackType, FrameType, CodeType]
_SourceObjectType = Union[ModuleType, Type[Any], MethodType, FunctionType, TracebackType, FrameType, CodeType]
def findsource(object: _SourceObjectType) -> Tuple[List[str], int]: ...
def getabsfile(object: _SourceObjectType) -> str: ...
@@ -69,13 +68,12 @@ def cleandoc(doc: str) -> str: ...
def indentsize(line: str) -> int: ...
# Classes and functions
def getclasstree(classes: List[type], unique: bool = ...) -> List[
Union[Tuple[type, Tuple[type, ...]], list]]: ...
def getclasstree(classes: List[type], unique: bool = ...) -> List[Union[Tuple[type, Tuple[type, ...]], List[Any]]]: ...
ArgSpec = NamedTuple('ArgSpec', [('args', List[str]),
('varargs', Optional[str]),
('keywords', Optional[str]),
('defaults', tuple),
('defaults', Tuple[Any, ...]),
])
ArgInfo = NamedTuple('ArgInfo', [('args', List[str]),