Skip to content

ci: the 'ty' typechecking is failing #14238

Closed

Description

@jayaddison

Describe the bug

Recently typechecking with Astral's ty utility was added to our GitHub Actions workflows in #14129.

However, currently ty v0.0.8 is reporting a few errors that cause pull requests to be flagged as failed.

Note: one of the errors/reports from the tool is in fact a note that there is a likely typo/config error in its own ty.toml config file:

warning[unknown-rule]: Unknown rule `non-subscriptable`. Did you mean `not-subscriptable`?
  --> ty.toml:25:1
   |
23 | invalid-assignment = "ignore"
24 | invalid-method-override = "ignore"
25 | non-subscriptable = "ignore"
   | ^^^^^^^^^^^^^^^^^
26 | possibly-missing-attribute = "ignore"

How to Reproduce

Recent pull requests and commits have encountered this problem, and until it is resolved, I expect new pull requests to too. For example:

Installing ty locally - for example, using pip install ty within a virtualenv - and then running ty check also replicates the problem.

Environment Information

N/A

Sphinx extensions

N/A

Additional context

No response

Edit: add ty version number, and local repro steps.

Activity

  1. changed the title [-]ci: the 'ty' typechecking GitHub Actions workflow job is failing[/-] [+]ci: the 'ty' typechecking is failing[/+] on Jan 4, 2026
  2. kaycebasques commented on Jun 17, 2026

    @kaycebasques
    SponsorContributor

    @abitrolly did some research around this in discussion https://github.com/orgs/sphinx-doc/discussions/14405

    Upstream ty feature request is here: astral-sh/ty#3127

    There is a proposal to map generic error names to ty names (astral-sh/ty#3127 (comment)) but it's only a proposal so far.

    It seems like the workaround for now is something like this:

    # type: ignore[arg-type, ty:invalid-argument-type]
    

    Sphinx would need to update to ty v0.0.25 to access this new syntax

    EDIT: my current opinion is that we should start with #14538

  3. abitrolly commented on Jun 18, 2026

    @abitrolly
    Contributor

    Or ditch this ty and replace it with Pyrefly from Meta which might not need these hacks .https://pyrefly.org/blog/v1.1/

  4. added a commit that references this issue on Jun 18, 2026
  5. kaycebasques commented on Jun 26, 2026

    @kaycebasques
    SponsorContributor

    @AA-Turner do you have a preferred approach on how to get the CI tests passing again?

    EDIT: my current opinion is that we should start with #14538 which gets ty passing with minimal work. bumping to v0.0.25 is a potential longer-term improvement but may take a lot of work. I have preserved my original comment below.

    My vote is to bump up to ty v0.0.25 and use the known-good workaround for now (below) and then revisit in the future when a more elegant solution (hopefully) gets supported

    # type: ignore[arg-type, ty:invalid-argument-type]
    
  6. danieleades commented on Jun 29, 2026

    @danieleades
    Contributor

    Sphinx would need to update to ty v0.0.25 to access this new syntax

    and pin it right? pin the version of ty to a fixed version, right?
    it's mad that this repo is currently using an non fixed version of a linter that's in rapid development

  7. kaycebasques commented on Jun 29, 2026

    @kaycebasques
    SponsorContributor

    Sphinx would need to update to ty v0.0.25 to access this new syntax

    and pin it right? pin the version of ty to a fixed version, right? it's mad that this repo is currently using an non fixed version of a linter that's in rapid development

    +1 to pinning since it's already burned us once and also because it's still v0.0.x as you mentioned

  8. jdillard commented on Jul 23, 2026

    @jdillard
    SponsorMember

    I think we should merge #14538 to pin ty to 0.0.10 for now to get CI passing and then come up with a way to upgrade (or change) after that.

  9. kaycebasques commented on Jul 24, 2026

    @kaycebasques
    SponsorContributor

    +1 we should merge #14538 as a preliminary step to get ty back to a healthy state

    @picnixz if you agree could you help us merge #14538? The TL;DR is that the ty GitHub Actions check is broken. #14538 pins it to the latest version of ty that works well with Sphinx's configuration. Longer-term we should get to a newer version and implement more robust checking throughout the Sphinx codebase. Or switch to a different product (other contributors seem to prefer Pyrefly). But for the short-term it's causing a lot of friction to review/contribute Sphinx PRs while this check is always failing. #14538 gets the Sphinx runner back to a healthy state with minimal work. Furthermore the codebase is starting to get a lot of competing issues and PRs seeking to fix this failing ty check

  10. jdillard commented on Aug 8, 2026

    @jdillard
    SponsorMember

    CI is green again after #14538 merged and pinned ty==0.0.10. Now it is left to determine the next steps.

    There are a couple older PRs, #14296 and #14328, that tried to address the ty errors that came from a newer version of ty, so if we decide to upgrade they can be revisited (although unsure if they should be closed at this point due to the pin).

    Alternatively, there have been talks of replacing ty with Pyrefly in #14499

  11. jayaddison commented on Aug 10, 2026

    @jayaddison
    ContributorAuthor

    Even though updating to a more recent version of ty likely makes sense, I would tend towards suggesting we close this issue thread, because we do have typechecking passing in CI again (resolving the reported problem).

  12. jdillard commented on Aug 11, 2026

    @jdillard
    SponsorMember

    I agree, best to start a new thread if we want to discuss how best to handle type checking.

  13. jayaddison commented on Aug 11, 2026

    @jayaddison
    ContributorAuthor

    Thanks @jdillard

  14. locked as resolved and limited conversation to collaborators on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions