Skip to content

ci: add informational ty type-check job (config-only replacement for #15174) - #15179

Closed
priya-sundaram-dev wants to merge 2 commits into
TheAlgorithms:masterfrom
priya-sundaram-dev:ci-ty-informational-config
Closed

ci: add informational ty type-check job (config-only replacement for #15174)#15179
priya-sundaram-dev wants to merge 2 commits into
TheAlgorithms:masterfrom
priya-sundaram-dev:ci-ty-informational-config

Conversation

@priya-sundaram-dev

@priya-sundaram-dev priya-sundaram-dev commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Config-only replacement for #15174, per @cclauss's request there. It wires ty into CI without the ~280-file from __future__ churn or any source edits, so the type-checker can start reporting findings immediately and get tightened gradually.

What this changes (2 files, config only):

  • .github/workflows/ty.yml — a new, standalone ty job. It is deliberately continue-on-error: true (informational), so it can never turn a required check red while the baseline is still noisy. It runs the type check on a regular (GIL) 3.14 interpreter (uv sync --python 3.14), which is the key fix for pre-commit: Add ty for Python type hints #15174: that PR's ty step ran inside the free-threaded 3.14t test venv, where several third-party stubs don't resolve — so ty fell back to defaults and reported ~45 errors, 42 of them on rules that a project config would have ignored. ty is also pinned (--with=ty==0.0.78, matching the ty-pre-commit rev in pre-commit: Add ty for Python type hints #15174) for reproducibility.
  • pyproject.toml — a minimal [tool.ty.environment] with python-version = "3.14", so ty's assumptions match that CI job. No rule ignores are invented here; the informational run surfaces the real findings first, and those get triaged into [tool.ty.rules] from actual output rather than guesses.

Why not touch the existing ruff workflow / rename it: keeping ruff untouched means no change to the required-check name (branch protection), and the new job stays cleanly separable.

Suggested path to a gate: land this informational; triage the reported diagnostics into [tool.ty.rules] a family at a time (the same gradual-un-ignore model I use on my own project); flip continue-on-error to false once the baseline is clean. The from __future__ cleanup from #15174, if still wanted, is orthogonal and can be its own PR so config lands fast and doesn't force a 280-file re-review.

I don't have ty + free-threaded CI locally to run the full check, so I've kept this to the safe, verifiable wiring; this repo's CI will show the actual ty output on the (non-blocking) job. Happy to iterate on flags or the config in review.


Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes configuration/CI files (no algorithm files).
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.

The type-hint / doctest / Wikipedia-URL items don't apply: this is a config-only CI change (.github/workflows/ty.yml + [tool.ty] in pyproject.toml), not an algorithm.

@algorithms-keeper

Copy link
Copy Markdown

Closing this pull request as invalid

@priya-sundaram-dev, this pull request is being closed as none of the checkboxes have been marked. It is important that you go through the checklist and mark the ones relevant to this pull request. Please read the Contributing guidelines.

If you're facing any problem on how to mark a checkbox, please read the following instructions:

  • Read a point one at a time and think if it is relevant to the pull request or not.
  • If it is, then mark it by putting a x between the square bracket like so: [x]

NOTE: Only [x] is supported so if you have put any other letter or symbol between the brackets, that will be marked as invalid. If that is the case then please open a new pull request with the appropriate changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed invalid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant