From 4632e5d0d9244e612c91a3881dd290e09167ec37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 2 Sep 2024 13:36:07 +0200 Subject: [PATCH] replace breakpoint() check with python lint --- pkgs/clan-app/default.nix | 9 --------- pkgs/clan-cli/default.nix | 9 --------- pkgs/clan-cli/pyproject.toml | 1 + pkgs/clan-vm-manager/default.nix | 9 --------- 4 files changed, 1 insertion(+), 27 deletions(-) diff --git a/pkgs/clan-app/default.nix b/pkgs/clan-app/default.nix index 3a1b8a023..bdc4b6f16 100644 --- a/pkgs/clan-app/default.nix +++ b/pkgs/clan-app/default.nix @@ -131,15 +131,6 @@ python3.pkgs.buildPythonApplication rec { ${pythonWithTestDeps}/bin/python -m pytest -s -m "not impure" ./tests touch $out ''; - - clan-app-no-breakpoints = runCommand "clan-app-no-breakpoints" { } '' - if grep --include \*.py -Rq "breakpoint()" ${source}; then - echo "breakpoint() found in ${source}:" - grep --include \*.py -Rn "breakpoint()" ${source} - exit 1 - fi - touch $out - ''; }; }; diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index 8db403407..3deb86fc9 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -151,15 +151,6 @@ python3.pkgs.buildPythonApplication { ${pythonWithTestDeps}/bin/python -m pytest -m "not impure and with_core" ./tests touch $out ''; - - check-for-breakpoints = runCommand "breakpoints" { } '' - if grep --include \*.py -Rq "breakpoint()" ${source}; then - echo "breakpoint() found in ${source}:" - grep --include \*.py -Rn "breakpoint()" ${source} - exit 1 - fi - touch $out - ''; }; passthru.nixpkgs = nixpkgs'; diff --git a/pkgs/clan-cli/pyproject.toml b/pkgs/clan-cli/pyproject.toml index fe0836152..4b5cb5ae0 100644 --- a/pkgs/clan-cli/pyproject.toml +++ b/pkgs/clan-cli/pyproject.toml @@ -78,6 +78,7 @@ lint.select = [ "N", "RUF", "TID", + "T100", "U", ] lint.ignore = ["E501", "E402", "E731", "ANN101", "ANN401", "A003"] diff --git a/pkgs/clan-vm-manager/default.nix b/pkgs/clan-vm-manager/default.nix index 4ff1b90d0..6a2c8c67f 100644 --- a/pkgs/clan-vm-manager/default.nix +++ b/pkgs/clan-vm-manager/default.nix @@ -121,15 +121,6 @@ python3.pkgs.buildPythonApplication rec { ${pythonWithTestDeps}/bin/python -m pytest -s -m "not impure" ./tests touch $out ''; - - clan-vm-manager-no-breakpoints = runCommand "clan-vm-manager-no-breakpoints" { } '' - if grep --include \*.py -Rq "breakpoint()" ${source}; then - echo "breakpoint() found in ${source}:" - grep --include \*.py -Rn "breakpoint()" ${source} - exit 1 - fi - touch $out - ''; }; };