mirror of
https://github.com/EdenQwQ/nixos.git
synced 2025-12-26 18:34:56 +08:00
use ruff for py
This commit is contained in:
parent
e3057eeb07
commit
31145354fb
4 changed files with 5 additions and 8 deletions
|
|
@ -20,7 +20,7 @@
|
|||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt.enable = true;
|
||||
programs.black.enable = true;
|
||||
programs.ruff-format.enable = true;
|
||||
programs.prettier.enable = true;
|
||||
programs.beautysh.enable = true;
|
||||
programs.toml-sort.enable = true;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ matugen_output = subprocess.run(
|
|||
colors = json.loads(matugen_output)["colors"][polarity]
|
||||
|
||||
base16_colors = {
|
||||
name: f'"{colors[hex].strip("\'")}"' for name, hex in base16_map.items()
|
||||
name: f'"{colors[hex].strip("'")}"' for name, hex in base16_map.items()
|
||||
}
|
||||
|
||||
yaml_content = f"""system: "base16"
|
||||
|
|
@ -64,9 +64,7 @@ name: "{name}"
|
|||
author: "matugen"
|
||||
variant: "{polarity}"
|
||||
palette:
|
||||
""" + "\n".join(
|
||||
[f" {k}: {v}" for k, v in base16_colors.items()]
|
||||
)
|
||||
""" + "\n".join([f" {k}: {v}" for k, v in base16_colors.items()])
|
||||
|
||||
with open(output, "w") as f:
|
||||
f.write(yaml_content)
|
||||
|
|
|
|||
|
|
@ -454,7 +454,6 @@ def closest_match(color: str, palette: Dict[str, Lab]) -> str:
|
|||
min_distance = float("inf")
|
||||
|
||||
for entry in palette:
|
||||
|
||||
# Prior dictionary lookup and update.
|
||||
lab_color = hex_to_lab_dict.get(color)
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
};
|
||||
};
|
||||
servers = {
|
||||
pyright.enable = true;
|
||||
ruff.enable = true;
|
||||
lua_ls.enable = true;
|
||||
bashls.enable = true;
|
||||
nixd = {
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
"injected"
|
||||
];
|
||||
yaml = [ "yamlfmt" ];
|
||||
python = [ "black" ];
|
||||
python = [ "ruff" ];
|
||||
tex = [ "latexindent" ];
|
||||
};
|
||||
formatters = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue