Skip to content

chore: pin ruff and ty linter versions - #246

Merged
jplbrun merged 3 commits into
mainfrom
chore/pin-linter-versions
Jul 29, 2026
Merged

chore: pin ruff and ty linter versions#246
jplbrun merged 3 commits into
mainfrom
chore/pin-linter-versions

Conversation

@jplbrun

@jplbrun jplbrun commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Disclaimer: Do not include SAP-internal or customer-specific information in this PR (e.g. internal system URLs, customer names, tenant IDs, or confidential configurations). This is a public repository.

Description

Pins the ty and ruff versions used by the code-quality checks.

CI's "Code Quality Checks" job runs the pre-commit hooks, which invoked the linters as unpinned uvx ty check . / uvx ruff .... uvx fetches the latest release from PyPI at run time, ignoring both uv.lock and the pyproject.toml dev-group constraints.

This PR pins the tools to exact versions in one place and invokes them so that pin is honoured everywhere:

  • pyproject.toml [dependency-groups] dev: ty==0.0.64, ruff==0.16.0 (both pinned to the latest release; ty was already at 0.0.64, ruff is bumped from the previously-resolved 0.15.5).
  • uv.lock: regenerated to record the pinned versions.
  • .pre-commit-config.yaml: the three hooks now use uv run ruff ... / uv run ty check . instead of uvx .... uv run executes the tools from the project's locked environment, so uv.lock is the single source of truth. It self-syncs the environment before running, so no extra uv sync step is needed in the hook path; CI's existing uv sync --all-extras already installs the dev group, which is a uv default group.
  • docs/DEVELOPMENT.md: updated the documented commands to uv run ... and added a note on the pin policy and how to bump versions.
  • Markdown reformat: ruff 0.16.0 formats Python code blocks embedded in Markdown (docstring-code formatting), which 0.15.5 did not. Adopting it reformats 18 *.md files (module user-guides + destination/spec/README.md) — cosmetic only (blank line after imports, wrapped long imports, aligned comments, trailing commas). No .py source and no Markdown prose was changed.

Local commits and CI now run the same, deliberately-chosen linter versions, which only change when we update pyproject.toml and re-lock.

Related Issue

N/A

Type of Change

Please check the relevant option:

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Dependency update

How to Test

Describe how reviewers can test your changes:

  1. Check out this branch and run uv sync --all-extras, then confirm the pinned versions resolve: uv run ty --version prints ty 0.0.64 and uv run ruff --version prints ruff 0.16.0.
  2. Run the code-quality checks: uv run ruff check ., uv run ruff format --check ., and uv run ty check . (this is what the pre-commit hooks invoke; CI runs them via uv sync --all-extras followed by uvx pre-commit run --all-files on a clean checkout).
  3. Expected result: the hooks run ruff/ty at the pinned versions and the Code Quality Checks CI job is green; a future ty/ruff release on PyPI no longer changes what runs here.

Checklist

Before submitting your PR, please review and check the following:

  • I have read the Contributing Guidelines
  • I have verified that my changes solve the issue
  • I have added/updated automated tests to cover my changes
  • All tests pass locally
  • I have verified that my code follows the Code Guidelines
  • I have updated documentation (if applicable)
  • I have added type hints for all public APIs
  • My code does not contain sensitive information (credentials, tokens, etc.)
  • I have followed Conventional Commits for commit messages

Breaking Changes

None for library users — no runtime source (.py) changed. For contributors, ruff 0.16.0 now formats Python code blocks inside Markdown, so the 18 reformatted *.md files reflect the new formatter output; future edits to Markdown code blocks are held to the same formatting.

Additional Notes

The three file-hygiene pre-commit hooks (check-yaml, end-of-file-fixer, trailing-whitespace) were already pinned via rev: v6.0.0 and are unchanged.

@cassiofariasmachado cassiofariasmachado left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just remember to adjust the title and description of this pull request.

@jplbrun jplbrun changed the title Chore/pin linter versions chore: pin ruff and ty linter versions Jul 29, 2026
@jplbrun
jplbrun marked this pull request as ready for review July 29, 2026 18:59
@jplbrun
jplbrun requested a review from a team as a code owner July 29, 2026 18:59
@jplbrun
jplbrun merged commit fa88827 into main Jul 29, 2026
10 of 11 checks passed
@jplbrun
jplbrun deleted the chore/pin-linter-versions branch July 29, 2026 19:26
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.

2 participants