mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-01 17:13:24 +08:00
Avoid using string literals in type annotations (#2294)
This commit is contained in:
committed by
Jelle Zijlstra
parent
25ad95de4f
commit
6192cce9d9
@@ -44,7 +44,7 @@ class FunctionType:
|
||||
__globals__ = func_globals
|
||||
__name__ = func_name
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, obj: Optional[object], type: Optional[type]) -> 'UnboundMethodType': ...
|
||||
def __get__(self, obj: Optional[object], type: Optional[type]) -> UnboundMethodType: ...
|
||||
|
||||
LambdaType = FunctionType
|
||||
|
||||
@@ -68,14 +68,14 @@ class GeneratorType:
|
||||
gi_code = ... # type: CodeType
|
||||
gi_frame = ... # type: FrameType
|
||||
gi_running = ... # type: int
|
||||
def __iter__(self) -> 'GeneratorType': ...
|
||||
def __iter__(self) -> GeneratorType: ...
|
||||
def close(self) -> None: ...
|
||||
def next(self) -> Any: ...
|
||||
def send(self, arg: Any) -> Any: ...
|
||||
@overload
|
||||
def throw(self, val: BaseException) -> Any: ...
|
||||
@overload
|
||||
def throw(self, typ: type, val: BaseException = ..., tb: 'TracebackType' = ...) -> Any: ...
|
||||
def throw(self, typ: type, val: BaseException = ..., tb: TracebackType = ...) -> Any: ...
|
||||
|
||||
class ClassType: ...
|
||||
class UnboundMethodType:
|
||||
|
||||
Reference in New Issue
Block a user