Skip to content

Commit 931af90

Browse files
committed
add ruff to dev env and pre-commit check
1 parent 92d1b6e commit 931af90

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

flake.nix

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
description = "A tool for creating and managing qutebrowser profiles";
33

4+
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
45
inputs.flake-utils.url = "github:numtide/flake-utils";
56
inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
7+
inputs.pre-commit-hooks.inputs.nixkpgs.follows = "nixkpkgs";
68

79
outputs = {
810
self,
@@ -16,13 +18,13 @@
1618
mkDevShell = args:
1719
pkgs.mkShell (args
1820
// {
19-
buildInputs = [
20-
(pkgs.python3.withPackages (ps:
21+
buildInputs = with pkgs; [
22+
ruff
23+
(python3.withPackages (ps:
2124
with ps; [
2225
pyxdg
2326
click
2427
pytest
25-
pylint
2628
mypy
2729
black
2830
]))
@@ -51,7 +53,7 @@
5153
statix.enable = true;
5254

5355
black.enable = true;
54-
isort.enable = true;
56+
ruff.enable = true;
5557
};
5658
};
5759
};

ruff.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
select = ["E", "F", "W", "I", "UP", "N", "ANN", "S", "B", "A", "C4", "PT", "SIM", "ARG"]
2+
target-version = "py39"
3+
ignore = [
4+
"E501", # line too long
5+
"ANN101", # annotate self
6+
"ANN102", # annotate cls
7+
]

0 commit comments

Comments
 (0)