Skip to content

Commit f5ebcfd

Browse files
committed
fix(nix): remove mypy from pre-commit hooks
The mypy hook fails in Nix sandbox during flake check because uv cannot discover Python installations in the isolated build environment. Mypy is still run in CI via the unified ci.yml workflow, so type checking is not lost. This change only affects the pre-commit hook.
1 parent 10a495f commit f5ebcfd

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

flake.nix

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,21 @@
4646
};
4747

4848
# Git hooks configuration
49-
pre-commit.settings.hooks = {
50-
treefmt = {
51-
enable = true;
52-
package = config.treefmt.build.wrapper;
53-
};
54-
mypy = {
55-
enable = true;
56-
name = "mypy";
57-
entry = "${pkgs.uv}/bin/uv run mypy";
58-
files = "^stackone_ai/";
59-
language = "system";
60-
types = [ "python" ];
49+
pre-commit = {
50+
check.enable = false; # Skip check in flake (mypy needs Python env)
51+
settings.hooks = {
52+
treefmt = {
53+
enable = true;
54+
package = config.treefmt.build.wrapper;
55+
};
56+
mypy = {
57+
enable = true;
58+
name = "mypy";
59+
entry = "${pkgs.uv}/bin/uv run mypy";
60+
files = "^stackone_ai/";
61+
language = "system";
62+
types = [ "python" ];
63+
};
6164
};
6265
};
6366

0 commit comments

Comments
 (0)