mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-16 23:13:37 +08:00
Enable --disallow-any-generics for stubs (#3288)
This commit is contained in:
committed by
Jelle Zijlstra
parent
23b353303b
commit
c32e1e2280
@@ -77,8 +77,7 @@ 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: ...
|
||||
@@ -174,7 +173,7 @@ def getclasstree(classes: List[type], unique: bool = ...) -> Any: ...
|
||||
ArgSpec = NamedTuple('ArgSpec', [('args', List[str]),
|
||||
('varargs', str),
|
||||
('keywords', str),
|
||||
('defaults', tuple),
|
||||
('defaults', Tuple[Any, ...]),
|
||||
])
|
||||
|
||||
Arguments = NamedTuple('Arguments', [('args', List[str]),
|
||||
@@ -188,7 +187,7 @@ def getargspec(func: object) -> ArgSpec: ...
|
||||
FullArgSpec = NamedTuple('FullArgSpec', [('args', List[str]),
|
||||
('varargs', Optional[str]),
|
||||
('varkw', Optional[str]),
|
||||
('defaults', tuple),
|
||||
('defaults', Tuple[Any, ...]),
|
||||
('kwonlyargs', List[str]),
|
||||
('kwonlydefaults', Dict[str, Any]),
|
||||
('annotations', Dict[str, Any]),
|
||||
|
||||
Reference in New Issue
Block a user