8000 Add missing attributes to `contextlib._(Async)GeneratorContextManager` by AlexWaygood · Pull Request #6676 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content
8000

Add missing attributes to contextlib._(Async)GeneratorContextManager #6676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Dec 26, 2021
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Increase type specificity in base class
  • Loading branch information
AlexWaygood committed Dec 23, 2021
commit 2606822d1bf56f3df3dc96d57c7e7f8283a880bd
6 changes: 3 additions & 3 deletions stdlib/contextlib.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ class ContextDecorator:

if sys.version_info >= (3, 7):
class _GeneratorContextManagerBase:
def __init__(self, func: Callable[_P, Any], args: _P.args, kwds: _P.kwds) -> None: ... # type: ignore[name-defined]
gen: Any
func: Callable[..., Any]
def __init__(self, func: Callable[_P, Iterator[Any] | AsyncIterator[Any]], args: _P.args, kwds: _P.kwds) -> None: ... # type: ignore[name-defined]
gen: Generator[Any, Any, Any] | AsyncGenerator[Any, Any]
func: Callable[..., Generator[Any, Any, Any] | AsyncGenerator[Any, Any]]
args: tuple[Any, ...]
kwds: dict[str, Any]
class _GeneratorContextManager(_GeneratorContextManagerBase, AbstractContextManager[_T_co], ContextDecorator, Generic[_T_co]):
Expand Down
0