Skip to content

Commit bcb0e68

Browse files
committed
ruffen up those docs
1 parent b11fa6c commit bcb0e68

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

  • crates/ty_python_semantic/resources/mdtest/conditional

crates/ty_python_semantic/resources/mdtest/conditional/match.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -447,13 +447,7 @@ If the match pattern is not an instance of `type`, we raise a diagnostic:
447447
from typing import Any
448448
from ty_extensions import Intersection
449449

450-
def _(
451-
val,
452-
val2: type | Any,
453-
val3: Intersection[type, Any],
454-
val4: type[Any],
455-
val5: type[int]
456-
):
450+
def _(val, Valid1: type | Any, Valid2: Intersection[type, Any], Valid3: type[Any], Valid4: type[int]):
457451
Invalid1 = "foo"
458452

459453
match val:
@@ -466,13 +460,13 @@ def _(
466460
# error: [invalid-match-pattern] "`<types.UnionType special-form 'int | str'>` cannot be used in a class pattern because it is not a type"
467461
case Invalid2():
468462
pass
469-
case val2(): # fine
463+
case Valid1(): # fine
470464
pass
471-
case val3(): # fine
465+
case Valid2(): # fine
472466
pass
473-
case val4(): # fine
467+
case Valid3(): # fine
474468
pass
475-
case val5(): # fine
469+
case Valid4(): # fine
476470
pass
477471
```
478472

0 commit comments

Comments
 (0)