summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorPatrick Hilhorst <git@hilhorst.be>2022-01-02 23:12:21 +0100
committerPatrick Hilhorst <git@hilhorst.be>2022-01-02 23:12:21 +0100
commit793a2f50f13f0c630cffbbb214f4128254945701 (patch)
treee913aff106c0af976f38c984be0f106a534b3376 /nixos
parenta2f5092867927ea6a9bfc916ae191d3722350a33 (diff)
downloadnixpkgs-793a2f50f13f0c630cffbbb214f4128254945701.tar
nixpkgs-793a2f50f13f0c630cffbbb214f4128254945701.tar.gz
nixpkgs-793a2f50f13f0c630cffbbb214f4128254945701.tar.bz2
nixpkgs-793a2f50f13f0c630cffbbb214f4128254945701.tar.lz
nixpkgs-793a2f50f13f0c630cffbbb214f4128254945701.tar.xz
nixpkgs-793a2f50f13f0c630cffbbb214f4128254945701.tar.zst
nixpkgs-793a2f50f13f0c630cffbbb214f4128254945701.zip
nixos/test-driver: remove unused imports, add pylint unused-import check
Diffstat (limited to 'nixos')
-rw-r--r--nixos/lib/test-driver/default.nix2
-rw-r--r--nixos/lib/test-driver/test_driver/machine.py1
-rw-r--r--nixos/lib/test-driver/test_driver/polling_condition.py4
3 files changed, 2 insertions, 5 deletions
diff --git a/nixos/lib/test-driver/default.nix b/nixos/lib/test-driver/default.nix
index 8fffdbb43ac..3aee9134318 100644
--- a/nixos/lib/test-driver/default.nix
+++ b/nixos/lib/test-driver/default.nix
@@ -26,7 +26,7 @@ python3Packages.buildPythonApplication rec {
     mypy --disallow-untyped-defs \
           --no-implicit-optional \
           --ignore-missing-imports ${src}/test_driver
-    pylint --errors-only ${src}/test_driver
+    pylint --errors-only --enable=unused-import ${src}/test_driver
     black --check --diff ${src}/test_driver
   '';
 }
diff --git a/nixos/lib/test-driver/test_driver/machine.py b/nixos/lib/test-driver/test_driver/machine.py
index 8615030b22e..e050cbd7d99 100644
--- a/nixos/lib/test-driver/test_driver/machine.py
+++ b/nixos/lib/test-driver/test_driver/machine.py
@@ -17,7 +17,6 @@ import threading
 import time
 
 from test_driver.logger import rootlog
-from test_driver.polling_condition import PollingCondition
 
 CHAR_TO_KEY = {
     "A": "shift-a",
diff --git a/nixos/lib/test-driver/test_driver/polling_condition.py b/nixos/lib/test-driver/test_driver/polling_condition.py
index 65b00114336..459845452fa 100644
--- a/nixos/lib/test-driver/test_driver/polling_condition.py
+++ b/nixos/lib/test-driver/test_driver/polling_condition.py
@@ -1,6 +1,4 @@
-from typing import Callable, Optional, Any, List, Dict
-from functools import wraps
-
+from typing import Callable, Optional
 import time
 
 from .logger import rootlog