mirror of
https://seed.flo-the.dev/z3gWc1qgaeZaoGwL4WTstLNoqjayM.git
synced 2025-12-06 04:47:35 +01:00
add hooks and python tooling
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
This commit is contained in:
31
devenv.nix
31
devenv.nix
@@ -1,4 +1,9 @@
|
|||||||
{ pkgs, lib, config, inputs, ... }:
|
{ pkgs
|
||||||
|
, lib
|
||||||
|
, config
|
||||||
|
, inputs
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
# https://devenv.sh/basics/
|
# https://devenv.sh/basics/
|
||||||
@@ -26,9 +31,29 @@
|
|||||||
|
|
||||||
# https://devenv.sh/languages/
|
# https://devenv.sh/languages/
|
||||||
languages.nix.enable = true;
|
languages.nix.enable = true;
|
||||||
languages.python.enable = true;
|
languages.python = {
|
||||||
|
enable = true;
|
||||||
|
venv = {
|
||||||
|
enable = true;
|
||||||
|
requirements = ./requirements.txt;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# https://devenv.sh/pre-commit-hooks/
|
# https://devenv.sh/pre-commit-hooks/
|
||||||
|
pre-commit.hooks = {
|
||||||
|
nixpkgs-fmt.enable = true;
|
||||||
|
# remove unused imports
|
||||||
|
autoflake.enable = true;
|
||||||
|
# formatter
|
||||||
|
black.enable = true;
|
||||||
|
# sort imports
|
||||||
|
isort.enable = true;
|
||||||
|
# look for code smell
|
||||||
|
pylint.enable = true;
|
||||||
|
detect-private-keys.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
# pre-commit.hooks.shellcheck.enable = true;
|
# pre-commit.hooks.shellcheck.enable = true;
|
||||||
|
|
||||||
# https://devenv.sh/processes/
|
# https://devenv.sh/processes/
|
||||||
|
|||||||
Reference in New Issue
Block a user