Skip to content

Commit cc66b2c

Browse files
mtshibasharkdp
andauthored
Update crates/ty_python_semantic/resources/mdtest/narrow/conditionals/nested.md
Co-authored-by: David Peter <sharkdp@users.noreply.github.com>
1 parent c0e1598 commit cc66b2c

File tree

1 file changed

+1
-1
lines changed
  • crates/ty_python_semantic/resources/mdtest/narrow/conditionals

1 file changed

+1
-1
lines changed

crates/ty_python_semantic/resources/mdtest/narrow/conditionals/nested.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def f(x: str | None, const: str | None):
243243

244244
if const is not None:
245245
def _():
246-
# Since there is no reassignment in `const`, no problem with narrowing.
246+
# The `const is not None` narrowing constraint is still valid since `const` has not been reassigned
247247
reveal_type(const) # revealed: str
248248

249249
class C2:

0 commit comments

Comments
 (0)