Skip to content

Make TaskGroup.__aexit__ return Literal[False]#472

Open
eitan-protego wants to merge 5 commits intofastapi:mainfrom
eitan-protego:main
Open

Make TaskGroup.__aexit__ return Literal[False]#472
eitan-protego wants to merge 5 commits intofastapi:mainfrom
eitan-protego:main

Conversation

@eitan-protego
Copy link

Defining TaskGroup.__aexit__ explicitly always return False allows type checkers to safely assume that all code inside of it ran to completion without swallowing exceptions. This in turn prevents type errors about variables defined inside the async with block being possibly undefined.

eitan-protego and others added 3 commits February 17, 2026 12:59
Defining TaskGroup.__aexit__ explicitly always return False allows type checkers to safely assume that all code inside of it ran to completion without swallowing exceptions. This in turn prevents type errors about variables defined inside the `async with` block being possibly undefined.
@svlandeg svlandeg added the feature New feature or request label Feb 17, 2026
@github-actions github-actions bot added the conflicts Automatically generated when a PR has a merge conflict label Feb 20, 2026
@github-actions

This comment was marked as resolved.

@github-actions github-actions bot removed the conflicts Automatically generated when a PR has a merge conflict label Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants