File tree Expand file tree Collapse file tree 3 files changed +19
-16
lines changed
Expand file tree Collapse file tree 3 files changed +19
-16
lines changed Original file line number Diff line number Diff line change 2727 system :
2828 let
2929 pkgs = nixpkgs . legacyPackages . ${ system } ;
30+ lib = pkgs . lib ;
31+
32+ pythonEnv = pkgs . home-assistant . python . withPackages (
33+ ps : with ps ; [
34+ aiohttp
35+ ( toPythonModule pkgs . home-assistant )
36+ voluptuous
37+ ]
38+ ) ;
3039 in
3140 {
3241 checks = {
3342 pre-commit = git-hooks . lib . ${ system } . run {
3443 src = ./. ;
3544 hooks = {
3645 ruff . enable = true ;
37- ruff-format = {
46+ ruff-format . enable = true ;
47+ pyright = {
3848 enable = true ;
39- pass_filenames = false ;
49+ entry = " ${ lib . getExe pkgs . pyright } --pythonpath ${ pythonEnv . interpreter } " ;
4050 } ;
4151 } ;
4252 } ;
4656 mkShell {
4757 inherit ( self . checks . ${ system } . pre-commit ) shellHook ;
4858
49- buildInputs =
50- [
51- isort
52- pyright
53- ruff
54- ]
55- ++ ( with python312 . pkgs ; [
56- aiohttp
57- ( toPythonModule pkgs . home-assistant )
58- voluptuous
59- ] ) ;
59+ buildInputs = [ pythonEnv ] ++ self . checks . ${ system } . pre-commit . enabledPackages ;
6060 } ;
6161
6262 formatter = pkgs . nixfmt-rfc-style ;
Original file line number Diff line number Diff line change 1+ [tool .ruff ]
2+ target-version = " py313"
3+
14[tool .ruff .lint ]
25select = [" I" ]
36
You can’t perform that action at this time.
0 commit comments