You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds two linting/formatting tools wired through pre-commit:
ruff — Python linter and formatter (replaces flake8 + black + isort). Config lives in python/pyproject.toml. _ffi.py and _core.py have targeted ignores to avoid noise from generated/large files.
This PR introduces pre-commit hooks for ruff (Python linting/formatting) and clang-format (C/C++ formatting), along with their respective configuration files. The setup follows standard conventions: ruff lint with --fix runs before ruff-format, versions are pinned, and per-file ignores for _ffi.py and _core.py are well-reasoned given their FFI/C-interop nature.
Confidence Score: 5/5
Safe to merge — purely additive tooling configuration with no logic changes.
All three files are new or additive config; no P0/P1 issues found. Hook order, pinned versions, line-length consistency (100 cols in both ruff and clang-format), and per-file ignores are all correct.
No files require special attention.
Important Files Changed
Filename
Overview
.pre-commit-config.yaml
New pre-commit config wiring ruff (v0.11.8) and clang-format (v19.1.7); correct hook order (ruff lint+fix before ruff-format), versions pinned.
.clang-format
New clang-format config based on LLVM with 4-space indent, 100-col limit, and SortIncludes disabled to preserve order-dependent C includes.
python/pyproject.toml
Adds ruff lint/format config; per-file ignores for _ffi.py and _core.py are intentional; E501 globally ignored (standard pattern when ruff-format enforces line length).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two linting/formatting tools wired through pre-commit:
python/pyproject.toml._ffi.pyand_core.pyhave targeted ignores to avoid noise from generated/large files..clang-format(LLVM base, 4-space indent, 100-col limit).Usage