We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
With the mypy check from this repo, no files get checked with mypy on a treefmt run.
mypy
To Reproduce
Steps to reproduce the behavior:
foo/bar.py
treefmt-nix
flake.nix
{ treefmt = { projectRootFile = "flake.nix"; programs = { nixfmt.enable = true; ruff.enable = true; mypy = { enable = true; directories = { ".".modules = [ "foo" ]; }; }; }; }; }
treefmt
I think part of the problem is the following in the final treefmt config:
includes = ["./foo/**/*.py"]
This doesn't seem to give any matches in treefmt.
After that I replaced the ".".modules = ["foo"] with ".".files = [ "*.py" ]. With that I got the following error:
".".modules = ["foo"]
".".files = [ "*.py" ]
+ /nix/store/ryp4vp6rs3d1gk0mgj6x8bncavsp4wqa-python3.12-mypy-1.10.1/bin/mypy '' '*.py' mypy: can't read file '*.py': No such file or directory
This is because *.py isn't a recursive glob, however it's the glob needed for treefmt to validate a change in any Python file in a repo with mypy.
*.py
Expected behavior
I don't know, not sure if this is even a bug.
What am I supposed to do to let mypy run against a given module (foo)?
foo
System information
NixOS 24.05, treefmt 2.0.5 (via treefmt-nix 879b29a), git-hooks.nix at rev 85f7a7177c678de68224af3402ab8ee1bcee25c8.
Additional context
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
With the
mypy
check from this repo, no files get checked with mypy on a treefmt run.To Reproduce
Steps to reproduce the behavior:
foo/bar.py
treefmt-nix
configuration (inflake.nix
):treefmt
doesn't give anymypy
errors.I think part of the problem is the following in the final treefmt config:
This doesn't seem to give any matches in treefmt.
After that I replaced the
".".modules = ["foo"]
with".".files = [ "*.py" ]
. With that I got the following error:This is because
*.py
isn't a recursive glob, however it's the glob needed fortreefmt
to validate a change in any Python file in a repo withmypy
.Expected behavior
I don't know, not sure if this is even a bug.
What am I supposed to do to let mypy run against a given module (
foo
)?System information
NixOS 24.05, treefmt 2.0.5 (via treefmt-nix 879b29a), git-hooks.nix at rev 85f7a7177c678de68224af3402ab8ee1bcee25c8.
Additional context
The text was updated successfully, but these errors were encountered: