File tree Expand file tree Collapse file tree 4 files changed +173
-16
lines changed
Expand file tree Collapse file tree 4 files changed +173
-16
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,18 @@ repositories:
33 nixpkgs : https://nixos.org/channels/nixos-unstable
44sources :
55 - https://git.sr.ht/~pvsr/qbpm
6+ environment :
7+ NIX : " nix --extra-experimental-features nix-command --extra-experimental-features flakes"
68tasks :
79 - deps : |
810 cd qbpm
9- nix-shell --quiet --run exit
11+ $NIX build .#devShells.x86_64-linux.ci
1012 - format : |
1113 cd qbpm
12- nix-shell --run ' black --diff --check qbpm tests'
14+ $NIX develop .#ci -c black --diff --check qbpm tests
1315 - mypy : |
1416 cd qbpm
15- nix-shell --run ' mypy qbpm tests'
17+ $NIX develop .#ci -c mypy qbpm tests
1618 - pytest : |
1719 cd qbpm
18- nix-shell --run pytest
20+ $NIX develop .#ci -c pytest
Original file line number Diff line number Diff line change 1313 flake-utils . lib . eachDefaultSystem (
1414 system : let
1515 pkgs = nixpkgs . legacyPackages . ${ system } ;
16+ mkDevShell = args :
17+ pkgs . mkShell ( args
18+ // {
19+ buildInputs = [
20+ ( pkgs . python3 . withPackages ( ps :
21+ with ps ; [
22+ pyxdg
23+ setuptools-scm
24+ pytest
25+ pylint
26+ mypy
27+ black
28+ ] ) )
29+ ] ;
30+ } ) ;
1631 in rec {
1732 packages = flake-utils . lib . flattenTree rec {
1833 qbpm = import ./. { inherit pkgs ; } ;
2237 qbpm = flake-utils . lib . mkApp { drv = packages . qbpm ; } ;
2338 default = qbpm ;
2439 } ;
25- devShell = pkgs . mkShell {
40+ devShells . ci = mkDevShell { } ;
41+ devShells . default = mkDevShell {
2642 inherit ( self . checks . ${ system } . pre-commit-check ) shellHook ;
27- buildInputs = [
28- ( pkgs . python3 . withPackages ( ps :
29- with ps ; [
30- pyxdg
31- setuptools-scm
32- pytest
33- pylint
34- mypy
35- black
36- ] ) )
37- ] ;
3843 } ;
3944
4045 checks = {
Original file line number Diff line number Diff line change @@ -8,3 +8,6 @@ warn_unused_ignores = True
88
99[mypy-xdg.*]
1010ignore_missing_imports = True
11+
12+ [mypy-tests.*]
13+ disallow_untyped_defs = False
You can’t perform that action at this time.
0 commit comments