Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: f23336e5dc4bf11588d7db19f675418cf570971b
hooks:
- id: no-commit-to-branch
args: ["--branch", "main"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: b831c3dc5d27d9da294ae4e915773b99aa24a7c5
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
- repo: https://github.com/NixOS/nixfmt
rev: ccb94535e519e94b77d6bda76ac1de06e9f11284
hooks:
- id: nixfmt-nix
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
cudaPackages.cuda_cudart
isort
mypy
pre-commit
pyright
ruff
]
Expand Down Expand Up @@ -192,6 +193,7 @@
postVenvCreation = ''
unset SOURCE_DATE_EPOCH
( python -m pip install --no-build-isolation --no-dependencies -e kernels )
pre-commit install
'';

}
Expand Down
1 change: 1 addition & 0 deletions kernels/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ build-backend = "setuptools.build_meta"
dev = [
"mktestdocs>=0.2.5",
"mypy>=1.15.0",
"pre-commit",
"pytest>=8",
# Whatever version is compatible with pytest.
"pytest-benchmark",
Expand Down
Loading