mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-19 23:09:55 +08:00
Use Generator instead of Iterator for 3rd-party context managers (#12481)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import ast
|
||||
import sys
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from collections.abc import Callable, Generator, Iterable, Iterator
|
||||
from contextlib import contextmanager
|
||||
from re import Pattern
|
||||
from typing import Any, ClassVar, Literal, TypeVar, overload
|
||||
@@ -203,7 +203,7 @@ class Checker:
|
||||
@property
|
||||
def scope(self) -> Scope: ...
|
||||
@contextmanager
|
||||
def in_scope(self, cls: Callable[[], Scope]) -> Iterator[None]: ...
|
||||
def in_scope(self, cls: Callable[[], Scope]) -> Generator[None]: ...
|
||||
def checkDeadScopes(self) -> None: ...
|
||||
def report(self, messageClass: Callable[_P, Message], *args: _P.args, **kwargs: _P.kwargs) -> None: ...
|
||||
def getParent(self, node: ast.AST) -> ast.AST: ...
|
||||
|
||||
Reference in New Issue
Block a user