Skip to content

Commit 438706a

Browse files
committed
And we're back to 10
1 parent e1bf304 commit 438706a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

crates/ty_python_semantic/resources/mdtest/attributes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,10 +2624,10 @@ def duplicate(x: T) -> tuple[T, T]:
26242624
return (x, x)
26252625

26262626
class E:
2627-
def f(self: Self):
2627+
def f(self: "E"):
26282628
self.x = duplicate(self.x)
26292629

2630-
reveal_type(C().x) # revealed: Unknown | tuple[Divergent, Divergent]
2630+
reveal_type(E().x) # revealed: Unknown | tuple[Divergent, Divergent]
26312631
```
26322632

26332633
And it also works for homogeneous tuples:

crates/ty_python_semantic/src/types/visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ pub(super) fn exceeds_max_specialization_depth(db: &dyn Db, ty: Type<'_>) -> boo
372372
//
373373
// reveal_type(x) # Unknown | Literal[1] | list[Divergent]
374374
// ```
375-
const MAX_SPECIALIZATION_DEPTH: usize = 14;
375+
const MAX_SPECIALIZATION_DEPTH: usize = 10;
376376

377377
specialization_depth(db, ty) > MAX_SPECIALIZATION_DEPTH
378378
}

0 commit comments

Comments
 (0)