Carl Meyer

Results 478 comments of Carl Meyer

Conformance tests look great! I filed https://github.com/astral-sh/ty/issues/2267, which I think captures what remains (after this PR) for us to fully pass the `TypeIs` and `TypeGuard` conformance tests. Ecosystem also looks...

Merged -- thank you for this!!

Sorry that I haven't gotten around to reviewing this PR yet. There's just been a lot to do, and providing this feature is lower on my priority list than some...

I think the issues we run into here on some recursive functions are closely related to the existing issues we have with recursive type aliases.

Marking this draft for now; please mark ready when its ready for review again. (This just helps streamline my notifications workflow.)

Yes, I think that makes sense, and corresponds to what I did in the final version of https://github.com/astral-sh/ruff/pull/20333 for tuple literals: if any element of the tuple we are constructing...

> * `T | Divergent = T (T is a non-recursive type)` > > * `G[R] = G[Divergent] (R is a recursive type, e.g. G[Divergent])` > > * `G[T |...

I see how that could work, as a type transform that we would use in place of the simpler "if ty.has_divergent_type(div): return div" type approach. I'm not sure it's a...

> The handling of unions in `IntersectionBuilder::add_positive_impl` seems to exponentially increase the number of `intersections`, which seems inherently problematic? Yes, it could be problematic, but it's required to keep set-theoretic...

I went through all the examples in https://github.com/astral-sh/ty/issues/1576 (and everything closed as a duplicate of it.) Most of them are fixed by this PR. https://github.com/astral-sh/ty/issues/1648 is a bug in the...