Skip to content

Commit 6580d27

Browse files
committed
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks rev: "v6.0.0" hooks: # Basic safety checks - id: check-added-large-files - id: check-ast - id: check-builtin-literals - id: check-case-conflict - id: check-docstring-first - id: check-executables-have-shebangs - id: check-json - id: check-merge-conflict - id: check-symlinks - id: check-toml - id: check-vcs-permalinks - id: check-xml - id: check-yaml args: ["--allow-multiple-documents"] - id: destroyed-symlinks - id: check-shebang-scripts-are-executable # Simple auto-fixers - id: end-of-file-fixer - id: fix-byte-order-marker - id: mixed-line-ending - id: pretty-format-json args: ["--autofix"] - id: requirements-txt-fixer - id: sort-simple-yaml - id: trailing-whitespace # Quick correctness checks - id: debug-statements - id: name-tests-test # Security checks (can also be placed last) - id: detect-private-key - id: forbid-new-submodules - repo: https://github.com/PyCQA/autoflake rev: "v2.3.1" hooks: - id: autoflake args: [ "--in-place", "--remove-all-unused-imports", "--remove-unused-variables", "--recursive", ] - repo: https://github.com/asottile/pyupgrade rev: "v3.21.2" hooks: - id: pyupgrade args: ["--py310-plus", "--keep-runtime-typing"] - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.14.10" hooks: # Formatter first so code is canonicalized - id: ruff-format # Then linting + autofixes - id: ruff args: ["--output-format=full", "--fix", "--config", "ruff.toml"] Fix
1 parent ece8272 commit 6580d27

File tree

5 files changed

+77
-71
lines changed

5 files changed

+77
-71
lines changed

.github/actions/setup-python-env/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ runs:
3333
- name: Setup just
3434
uses: extractions/setup-just@v2
3535
with:
36-
version: ${{ inputs.just-version }}
36+
just-version: ${{ inputs.just-version }}
3737
- name: Install Python dependencies
3838
run: just install
3939
shell: bash

.justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ clean:
5959
@echo "Cleaning..."
6060
@find . -type d -name ".venv" -exec rm -rf {} +
6161
@find . -type d -name "__pycache__" -exec rm -rf {} +
62+
@find . -type d -name ".pytest_cache" -exec rm -rf {} +
6263
@find . -type d -name "*.ruff_cache" -exec rm -rf {} +
6364
@find . -type d -name "*.egg-info" -exec rm -rf {} +
6465

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ repos:
5757
args: ["--py310-plus", "--keep-runtime-typing"]
5858

5959
- repo: https://github.com/astral-sh/ruff-pre-commit
60-
rev: "v0.14.6"
60+
rev: "v0.14.10"
6161
hooks:
6262
# Formatter first so code is canonicalized
6363
- id: ruff-format
6464
# Then linting + autofixes
6565
- id: ruff
66-
args: ["--output-format=full", "--fix", "--config", "ruff.toml"]
66+
args: ["--output-format=full", "--fix", "--unsafe-fixes", "--config", "ruff.toml"]

shell.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ pkgs.mkShell {
88
uv # Python package manager
99
nixfmt # Nix formatter
1010
just # Just
11+
stdenv.cc.cc.lib # C++ standard library
1112
];
1213

1314
# Shell hook to set up environment
1415
shellHook = ''
1516
export TMPDIR=/tmp
17+
export UV_PYTHON="${pkgs.python312}/bin/python"
18+
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH"
1619
just install
1720
'';
1821
}

0 commit comments

Comments
 (0)