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
while
We currently only narrow for if/elif, match and Boolean expressions. Narrowing for while loops should also be supported, for example:
if
elif
match
def f(n: int) -> int | None: ... n = 0 while (x := f(n)) is not None: reveal_type(x) n += 1
The text was updated successfully, but these errors were encountered:
d7ce548
sharkdp
Successfully merging a pull request may close this issue.
We currently only narrow for
if
/elif
,match
and Boolean expressions. Narrowing forwhile
loops should also be supported, for example:The text was updated successfully, but these errors were encountered: