We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
contextlib.nullcontext()
Bug Report
When a ternary is used in a with or an async with statement to determine the final context manager, mypy cannot infer the expression type.
with
async with
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.11&gist=a2db21d63361bc0f1f334ff337509fca
Expected Behavior
The expression should lead to TaskGroup type.
TaskGroup
Actual Behavior
The expression lead to object type.
object
Your Environment
The text was updated successfully, but these errors were encountered:
Duplicate of #10109 and #5512
Sorry, something went wrong.
No branches or pull requests
Bug Report
When a ternary is used in a
with
or anasync with
statement to determine the final context manager, mypy cannot infer the expression type.To Reproduce
https://mypy-play.net/?mypy=latest&python=3.11&gist=a2db21d63361bc0f1f334ff337509fca
Expected Behavior
The expression should lead to
TaskGroup
type.Actual Behavior
The expression lead to
object
type.Your Environment
The text was updated successfully, but these errors were encountered: