nixos/lib/test-driver: fix linting after compatibility clean‐up
The previous commit removed the handling of `dict` arguments, but
didn’t adjust the type, leading to the following type-checking error:
test_driver/driver.py:216: error: Argument 1 to "NixStartScript" has incompatible type "str | dict[Any, Any]"; expected "str" [arg-type]
It also left an unused import that Ruff is unhappy about:
build/lib/test_driver/driver.py:11:22: F401 [*] `colorama.Fore` imported but unused
…
build/lib/test_driver/driver.py:11:28: F401 [*] `colorama.Style` imported but unused
Fixes: 71306e6b36
(cherry picked from commit d490680530)
(cherry picked from commit ff31b814b62c760b1abbedc43d9b34d2dc75b351)
This commit is contained in:
@@ -8,8 +8,6 @@ from contextlib import AbstractContextManager, contextmanager
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from colorama import Fore, Style
|
|
||||||
|
|
||||||
from test_driver.logger import AbstractLogger
|
from test_driver.logger import AbstractLogger
|
||||||
from test_driver.machine import Machine, NixStartScript, retry
|
from test_driver.machine import Machine, NixStartScript, retry
|
||||||
from test_driver.polling_condition import PollingCondition
|
from test_driver.polling_condition import PollingCondition
|
||||||
@@ -206,7 +204,7 @@ class Driver:
|
|||||||
|
|
||||||
def create_machine(
|
def create_machine(
|
||||||
self,
|
self,
|
||||||
start_command: str | dict,
|
start_command: str,
|
||||||
*,
|
*,
|
||||||
name: str | None = None,
|
name: str | None = None,
|
||||||
keep_vm_state: bool = False,
|
keep_vm_state: bool = False,
|
||||||
|
|||||||
Reference in New Issue
Block a user