Repository navigation
Pin ty to 0.0.10 and clear remaining check failures - #14538
Conversation
Stop floating to the latest ty release, and rename `non-subscriptable` to `not-subscriptable` for current ty. Co-authored-by: Cursor <[email protected]>
Expand ty.toml ignores so the pinned checker is green, and remove `# ty: ignore` comments that are unused under those rules. Co-authored-by: Cursor <[email protected]>
This reverts commit 088b0dc.
0.0.59 still reports hundreds of diagnostics with the current rule ignores. Pin the newest release that stays green without expanding ty.toml, rename `not-subscriptable`, and rewrite the three call sites that fail under that pin. Co-authored-by: Cursor <[email protected]>
Keep the ty pin and ty.toml rule rename only. Co-authored-by: Cursor <[email protected]>
These are the only diagnostics left with the current ty.toml ignores. Co-authored-by: Cursor <[email protected]>
|
I think 0.0.10 is great to get CI passing again, but the relase is from 2026-01-07 and we should have a follow up plan to update it. |
| basename == '__init__' + suffix | ||
| for suffix in sorted(PY_SUFFIXES, key=len, reverse=True) | ||
| ) | ||
| return any(basename == '__init__' + suffix for suffix in PY_SUFFIXES) |
There was a problem hiding this comment.
The sort cannot affect equality-based results, and removing it avoids rebuilding and sorting the suffix list on every call while restoring .py as the first/common case.
Also, existing apidoc tests seem to cover relevant suffix behavior. So this looks good to me.
There was a problem hiding this comment.
Yes and it's clearer that way I should say.
|
@picnixz you think this is a good quick fix to get the |
|
Re: the failing Python 3.12 (Docutils 0.21) check, I can't reproduce locally. I tried a bunch of parallelization and randomization options (see below) but I was never able to get that |
kaycebasques
left a comment
There was a problem hiding this comment.
thank you @adamtheturtle I think your approach is the most logical first step towards fixing the failing ty check. more comments here: #14238 (comment)
| if isinstance(obj, (list, tuple, set, frozenset)): | ||
| # Convert to a sorted list | ||
| return sorted(map(_stable_str_prep, obj), key=str) | ||
| return sorted((_stable_str_prep(x) for x in obj), key=str) |
There was a problem hiding this comment.
For this one, please just add a ty ignore guard or whatever that would be convenient for us. Likewise for the filter() usage in matching.py
| "mypy==1.19.1", | ||
| "pyrefly", | ||
| "pyright==1.1.407", | ||
| "ty", |
There was a problem hiding this comment.
Can you add a comment about why we need to pin it?
|
I think everything is done and resolved, let's merge? @picnixz I think you need to do the merge because of the failing checks? Those failing tests ( |
|
Sorry I was away for the past 2 weeks and I forgot about this PR. Thanks for the ping! |
Summary
tyto0.0.10(newest release that stays green with the existingty.tomlignores).non-subscriptable→not-subscriptable.