[image] felix: apply plugin: ‘com.palantir.transforms.lang.format-code-ruff’ +1 to @A_Klapp 's point. It would be nice to configure what happens during “Alt-Shift-F”. in my experience, I found that Ruff or Black formatters mismatch what Alt-Shift-F does in major two ways: only Alt-Shift-F d… Answer from Yurii.Mashtalir on community.palantir.com
🌐
GitHub
github.com › astral-sh › ruff-pre-commit
GitHub - astral-sh/ruff-pre-commit: A pre-commit hook for Ruff. · GitHub
A pre-commit hook for Ruff. Contribute to astral-sh/ruff-pre-commit development by creating an account on GitHub.
Starred by 1.9K users
Forked by 98 users
Languages   Python
🌐
Astral
docs.astral.sh › ruff › integrations
Integrations | Ruff
- repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.15.16 hooks: # Run the linter. - id: ruff-check # Run the formatter.
Discussions

How to use Ruff?
You run it separately until you develop a set of rules you are comfortable with it enforcing, and a subset you are comfortable with it fixing. Given that any decent IDE will integrate it, I would assume it's very rare that any developer ever runs it manually. More on reddit.com
🌐 r/learnpython
6
5
February 11, 2026
python poetry - Running git commit is not properly running pre-commit hooks - Stack Overflow
I'm currently using Ruff and am using pre-commit hooks to run it with configuration info in .pre-commit-config.yaml and .ruff.toml. When I run pre-commit run --all-files the rules like isort run fi... More on stackoverflow.com
🌐 stackoverflow.com
5 Pre-Commit Hooks Every Data Engineer Should Know
Great share for people not in the know. I will say I used all of these until last year when ruff matured. Nearly all the python focused hooks can be replaced with just ruff and the proper ruff features enabled. More on reddit.com
🌐 r/dataengineering
30
178
March 15, 2025
python - Different results from Ruff between CLI and pre-commit hook - Stack Overflow
I've set up a pre-commit hook for using Ruff to handle linting in my project. I've configured the hook as per the documentation: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.4.9 ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Palantir Developer Community
community.palantir.com › ask the community
Ruff code formatter and pre-commit hooks - Ask the Community - Palantir Developer Community
September 19, 2024 - Dear Foundry community & Palantir engineers Through our CI/CD pipelines we want to implement a way to automatically ensure that all PRs are following a defined code formatting principle. We are interrested to implement a code formatting and check through Ruff.
🌐
Medium
medium.com › @kutayeroglu › automate-python-formatting-with-ruff-and-pre-commit-b6cd904b727e
Automate Python Formatting: with Ruff and pre-commit | by Kutay Eroğlu | Medium
April 30, 2025 - 🔄 Seamless workflow: Fixes applied automatically during git commit ... repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.11.7 hooks: # Run the formatter.
🌐
Reddit
reddit.com › r/learnpython › how to use ruff?
r/learnpython on Reddit: How to use Ruff?
February 11, 2026 -

I'm mainly just a hobby programmer but I'm trying to up my CI/CD game. I'm comfortable with mypy and pytest and I'm now looking to integrate ruff. Obviously I know how to launch it, but I'm confused about how its used in practice.

For example, running as:

ruff check
ruff format --check

And then manually addressing objections? Or, do you just let ruff make its changes:

ruff check --fix
ruff format

...or something else entirely? Thanks.

🌐
pre-commit
pre-commit.com › hooks.html
pre-commit
astral-sh/ruff-pre-commit: the ruff linter and formatter for python · google/yapf: a highly configurable python formatter · PyCQA/flake8: a linter framework for python · PyCQA/isort: an import sorter for python · PyCQA/(others): a few other python code quality tools ·
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 78753510 › running-git-commit-is-not-properly-running-pre-commit-hooks
python poetry - Running git commit is not properly running pre-commit hooks - Stack Overflow
I'm currently using pre-commit installed with Poetry, and am doing poetry install --with dev to install pre-commit. ... repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.5.0 hooks: # Run the linter. - id: ruff args: [ --fix ] # Run the formatter.
🌐
Plain English
python.plainenglish.io › how-a-tiny-ruff-config-made-my-commits-9-faster-5170e3f778f5
How a Tiny Ruff Config Made My Commits 9× Faster | by Soren.Zen | Python in Plain English
November 15, 2025 - How a Tiny Ruff Config Made My Commits 9× Faster Make your pre-commit more efficient I used to use tools like flake8, pylint, and isort to speed up my development process. Generally speaking, you …
🌐
Stack Overflow
stackoverflow.com › questions › 78637149 › different-results-from-ruff-between-cli-and-pre-commit-hook
python - Different results from Ruff between CLI and pre-commit hook - Stack Overflow
Pre-commit runs only on the files in the git repo. So if a.py was not added to git, then it's only checked by ruff check and not pre-commit.
🌐
GitHub
github.com › astral-sh › ruff › discussions › 11924
Different results between CLI and Pre-Commit · astral-sh/ruff · Discussion #11924
- repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.4.9 hooks: - id: ruff args: [ --fix ] - id: ruff-format
Author   astral-sh
🌐
Principles of Visualization
ericmjl.github.io › blog › 2023 › 10 › 9 › its-time-to-upgrade-to-ruff
It's time to upgrade to Ruff
October 9, 2023 - Pre-commit hooks are beneficial to ensure that the checks run automatically before your code gets committed, ensuring its quality. ... - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version.
🌐
GitHub
github.com › astral-sh › ruff › discussions › 14647
Which `pre-commit-hooks` are Available in `ruff`? · astral-sh/ruff · Discussion #14647
- repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - id: check-docstring-first name: (pre-commit-hooks) Check docstrings defined before code - id: name-tests-test name: (pre-commit-hooks) Check tests named correctly ('test_*.py') args: [ "--django", # `test_*.py` style ] - id: check-merge-conflict name: (pre-commit-hooks) Check no files contain merge conflict strings - id: check-toml name: (pre-commit-hooks) Check TOML files parseable - id: check-yaml name: (pre-commit-hooks) Check YAML files parseable · Beta Was this translation helpful? Give feedback. ... There was an error while loading. Please reload this page. Something went wrong. There was an error while loading. Please reload this page. ... Just the first two probably? The rest of those are not really Python ints. See https://github.com/astral-sh/ruff-pre-commit and https://docs.astral.sh/ruff/rules/
Author   astral-sh
🌐
Astral
docs.astral.sh › ruff › settings
Settings | Ruff
Setting force-exclude = true will cause Ruff to respect these exclusions unequivocally. This is useful for pre-commit, which explicitly passes all changed files to the ruff-pre-commit plugin, regardless of whether they're marked as excluded by Ruff's own settings.
🌐
GitHub
github.com › pwr-Solaar › Solaar › issues › 2295
Switch pre-commit hooks to ruff (100x faster pre-commit, updated code style) · Issue #2295 · pwr-Solaar/Solaar
February 17, 2024 - Introduce a formatter, that's fast enough to use during development, e.g. by running pre-commit run -a or just ruff format. You then leverage a shortcut for auto-formatting or your IDE's format-on-save feature, ruff plugin etc.
Author   pwr-Solaar
🌐
JSON Schema Validator
jsonschemavalidator.net
JSON Schema Validator - Newtonsoft
An online, interactive JSON Schema validator. Supports JSON Schema Draft 3, Draft 4, Draft 6, Draft 7, Draft 2019-09 and Draft 2020-12 · This schema validator is built using Json.NET Schema and C#
🌐
Reddit
reddit.com › r/python › i built a tool that auto-syncs pre-commit hook versions with `uv.lock`
r/Python on Reddit: I Built a tool that auto-syncs pre-commit hook versions with `uv.lock`
August 28, 2025 -

TL;DR: Auto-sync your pre-commit hook versions with uv.lock

# Add this to .pre-commit-config.yaml
- repo: https://github.com/tsvikas/sync-with-uv
  rev: v0.3.0
  hooks:
    - id: sync-with-uv

Benefits:

  • Consistent tool versions everywhere (local/pre-commit/CI)

  • Zero maintenance

  • Keeps pre-commit's isolation and caching benefits

  • Works with pre-commit.ci

The Problem

PEP 735 recommends putting dev tools in pyproject.toml under [dependency-groups]. But if you also use these tools as pre-commit hooks, you get version drift:

  • uv update bumps black to 25.1.0 in your lockfile

  • Pre-commit still runs black==24.2.0

  • Result: inconsistent results between local tool and pre-commit.

What My Project Does

This tool reads your uv.lock and automatically updates .pre-commit-config.yaml to match.

Works as a pre-commit (see above) or as a one-time run: uvx sync-with-uv

Target Audience

developers using uv and pre-commit

Comparison 

❌ Using manual updates?

  • Cumbersome

  • Easy to forget

❌ Using local hooks?

- repo: local
  hooks:
    - id: black
      entry: uv run black
  • Breaks pre-commit.ci

  • Loses pre-commit's environment isolation and tool caching

❌ Removing the tools from pyproject.toml?

  • Annoying to repeatedly type pre-commit run black

  • Can't pass different CLI flags (ruff --select E501 --fix)

  • Some IDE integration breaks (when it requires the tool in your environment)

  • Some CI integrations break (like the black action auto-detect of the installed version)

Similar tools:

  • sync_with_poetry - Poetry version

  • sync-pre-commit-lock - PDM/Poetry plugin

Try it out: https://github.com/tsvikas/sync-with-uv

Star if it helps! Issues and PRs welcome. ⭐

🌐
Wikipedia
en.wikipedia.org › wiki › 2025–26_California_Golden_Bears_men's_basketball_team
2025–26 California Golden Bears men's basketball team - Wikipedia
April 7, 2026 - The December 21 victory over Columbia gave Cal its first 12–1 start since the 1959–60 team that entered the 1960 NCAA University Division basketball tournament with one loss and were national runner-up. Although the team had been ranked 16th of 18 in the preseason polls,, after the 12-1 start, the team was expected to win over 20 games before the 2026 ACC men's basketball tournament.
🌐
GitHub
github.com › astral-sh › ruff › blob › main › .pre-commit-config.yaml
ruff/.pre-commit-config.yaml at main · astral-sh/ruff
March 17, 2026 - An extremely fast Python linter and code formatter, written in Rust. - ruff/.pre-commit-config.yaml at main · astral-sh/ruff
Author   astral-sh