move mypy to treefmt

This commit is contained in:
Jörg Thalheim 2023-08-12 10:12:54 +02:00 committed by mergify[bot]
parent f56f553c53
commit 9d675f2509
4 changed files with 7 additions and 8 deletions

View File

@ -8,15 +8,12 @@ pkgs.python311.pkgs.buildPythonApplication {
buildInputs = [ pkgs.makeWrapper ];
nativeCheckInputs = [
pkgs.python311.pkgs.pytest
pkgs.glibcLocales
pkgs.mypy
# technically not test inputs, but we need it for development in PATH
pkgs.nixVersions.stable or pkgs.nix_2_4
pkgs.nix-prefetch-git
];
checkPhase = ''
echo -e "\x1b[32m## run mypy\x1b[0m"
mypy --no-warn-unused-ignores --strict nix_update tests
PYTHONPATH= $out/bin/nix-update --help
'';
makeWrapperArgs = [
"--prefix PATH"

View File

@ -50,15 +50,16 @@
]
},
"locked": {
"lastModified": 1685519364,
"narHash": "sha256-rE9c9jWDSc5Nj0OjNzBENaJ6j4YBphcqSPia2IwCMLA=",
"lastModified": 1691824990,
"narHash": "sha256-6G7X/8wwVW7txaiMp3YOnJgQSBx8odXasOk9BeDU5ag=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "6521a278bcba66b440554cc1350403594367b4ac",
"rev": "bd817ed6d1e2f3d1a929bd40704347f0709da777",
"type": "github"
},
"original": {
"owner": "numtide",
"ref": "mypy",
"repo": "treefmt-nix",
"type": "github"
}

View File

@ -6,7 +6,7 @@
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.url = "github:numtide/treefmt-nix/mypy";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
};

View File

@ -9,6 +9,7 @@
projectRootFile = "flake.lock";
programs.prettier.enable = true;
programs.mypy.enable = true;
settings.formatter = {
nix = {