Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
black,isort,ruff: include .pyi (hercules-ci#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
itstarsun authored Nov 12, 2023
1 parent 8b25ad8 commit e82f32a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/formatter-black.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
[formatter.black]
command = "black"
excludes = []
includes = ["*.py"]
includes = ["*.py", "*.pyi"]
options = []
2 changes: 1 addition & 1 deletion examples/formatter-isort.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
[formatter.isort]
command = "isort"
excludes = []
includes = ["*.py"]
includes = ["*.py", "*.pyi"]
options = []
2 changes: 1 addition & 1 deletion examples/formatter-ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
[formatter.ruff]
command = "ruff"
excludes = []
includes = ["*.py"]
includes = ["*.py", "*.pyi"]
options = []
5 changes: 4 additions & 1 deletion programs/black.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ in
config = lib.mkIf cfg.enable {
settings.formatter.black = {
command = cfg.package;
includes = [ "*.py" ];
includes = [
"*.py"
"*.pyi"
];
};
};
}
5 changes: 4 additions & 1 deletion programs/isort.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ in
settings.formatter.isort = {
command = cfg.package;
options = if cfg.profile != "" then [ "--profile" cfg.profile ] else [ ];
includes = [ "*.py" ];
includes = [
"*.py"
"*.pyi"
];
};
};
}
5 changes: 4 additions & 1 deletion programs/ruff.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ in
settings.formatter.ruff = {
command = cfg.package;
options = lib.optional cfg.format "format";
includes = [ "*.py" ];
includes = [
"*.py"
"*.pyi"
];
};
};
}

0 comments on commit e82f32a

Please sign in to comment.