Skip to content

Add ruff and ty pre-commit hooks with CI workflow - #8

Merged
chrisburr merged 2 commits into
masterfrom
copilot/add-standard-pre-commit-tools
Feb 20, 2026
Merged

Add ruff and ty pre-commit hooks with CI workflow#8
chrisburr merged 2 commits into
masterfrom
copilot/add-standard-pre-commit-tools

Conversation

Copilot AI commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Adds standard Python linting/formatting (ruff) and type checking (ty) via pre-commit, with a GitHub Actions workflow to enforce them on PRs and pushes to main.

Changes

  • .pre-commit-config.yaml — configures three hooks:

    • ruff — linting with auto-fix
    • ruff-format — code formatting
    • ty (local, pinned to 0.0.17) — type checking via ty check --ignore unresolved-import (sphinx/docutils stubs unavailable in the pre-commit env)
  • .github/workflows/pre-commit.yml — runs pre-commit run --all-files on every PR and push to main using pre-commit/action@v3.0.1

  • Existing source files — reformatted by ruff format to pass from day one; two lines in sphinx_config/__init__.py annotated with # type: ignore[attr-defined] to suppress ty's correct-but-unfixable complaint about the setup.extra_setup_funcs dynamic attribute pattern

Original prompt

This section details on the original issue you should resolve

<issue_title>adding standard pre-commit tools, like ruff/ty?</issue_title>
<issue_description>Can we do the same for adding standard pre-commit tools, like ruff/ty?

Originally posted by @jpwgnr in #5 (comment)</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: chrisburr <5220533+chrisburr@users.noreply.github.com>
Copilot AI changed the title [WIP] Add standard pre-commit tools like ruff and ty Add ruff and ty pre-commit hooks with CI workflow Feb 19, 2026
Copilot AI requested a review from chrisburr February 19, 2026 17:34
@chrisburr
chrisburr marked this pull request as ready for review February 19, 2026 19:05
@chrisburr
chrisburr merged commit 6e9a119 into master Feb 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

adding standard pre-commit tools, like ruff/ty?

2 participants