File tree Expand file tree Collapse file tree 2 files changed +67
-0
lines changed Expand file tree Collapse file tree 2 files changed +67
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,8 @@ use nix
112
112
113
113
- [ black] ( https://github.com/psf/black )
114
114
- [ isort] ( https://github.com/PyCQA/isort )
115
+ - [ pylint] ( https://github.com/PyCQA/pylint )
116
+ - [ flake8] ( https://github.com/PyCQA/flake8 )
115
117
116
118
## Rust
117
119
Original file line number Diff line number Diff line change 204
204
} ;
205
205
206
206
} ;
207
+
208
+ pylint =
209
+ {
210
+ binPath =
211
+ mkOption {
212
+ type = types . str ;
213
+ description = lib . mdDoc "Pylint binary path. Should be used to specify Pylint binary from your Nix-managed Python environment." ;
214
+ default = "${ pkgs . python39Packages . pylint } /bin/pylint" ;
215
+ defaultText = lib . literalExpression ''
216
+ "'' ${pkgs.python39Packages.pylint}/bin/pylint"
217
+ '' ;
218
+ } ;
219
+
220
+ reports =
221
+ mkOption {
222
+ type = types . bool ;
223
+ description = lib . mdDoc "Whether to display a full report." ;
224
+ default = false ;
225
+ } ;
226
+
227
+ score =
228
+ mkOption {
229
+ type = types . bool ;
230
+ description = lib . mdDoc "Whether to activate the evaluation score." ;
231
+ default = true ;
232
+ } ;
233
+ } ;
234
+
235
+ flake8 =
236
+ {
237
+ binPath =
238
+ mkOption {
239
+ type = types . str ;
240
+ description = lib . mdDoc "flake8 binary path. Should be used to specify flake8 binary from your Nix-managed Python environment." ;
241
+ default = "${ pkgs . python39Packages . flake8 } /bin/flake8" ;
242
+ defaultText = lib . literalExpression ''
243
+ "'' ${pkgs.python39Packages.pylint}/bin/flake8"
244
+ '' ;
245
+ } ;
246
+
247
+ format =
248
+ mkOption {
249
+ type = types . str ;
250
+ description = lib . mdDoc "Output format." ;
251
+ default = "default" ;
252
+ } ;
253
+ } ;
254
+
207
255
} ;
208
256
209
257
config . hooks =
674
722
types = [ "file" ] ;
675
723
} ;
676
724
725
+ pylint =
726
+ {
727
+ name = "pylint" ;
728
+ description = "Lint Python files." ;
729
+ entry = with settings . pylint ;
730
+ "${ binPath } ${ lib . optionalString reports "-ry" } ${ lib . optionalString ( ! score ) "-sn" } " ;
731
+ types = [ "python" ] ;
732
+ } ;
733
+
734
+ flake8 =
735
+ {
736
+ name = "flake8" ;
737
+ description = "Check the style and quality of Python files." ;
738
+ entry = "${ settings . flake8 . binPath } --format ${ settings . flake8 . format } " ;
739
+ types = [ "python" ] ;
740
+ } ;
741
+
677
742
} ;
678
743
}
You can’t perform that action at this time.
0 commit comments