enable ASYNC, DTZ, YTT and EM lints
This commit is contained in:
@@ -11,7 +11,8 @@ def is_valid_age_key(secret_key: str) -> bool:
|
||||
if result.returncode == 0:
|
||||
return True
|
||||
else:
|
||||
raise ValueError(f"Invalid age key: {secret_key}")
|
||||
msg = f"Invalid age key: {secret_key}"
|
||||
raise ValueError(msg)
|
||||
|
||||
|
||||
def is_valid_ssh_key(secret_key: str, ssh_pub: str) -> bool:
|
||||
@@ -26,9 +27,9 @@ def is_valid_ssh_key(secret_key: str, ssh_pub: str) -> bool:
|
||||
|
||||
if result.returncode == 0:
|
||||
if result.stdout != ssh_pub:
|
||||
raise ValueError(
|
||||
f"Expected '{ssh_pub}' got '{result.stdout}' for ssh key: {secret_key}"
|
||||
)
|
||||
msg = f"Expected '{ssh_pub}' got '{result.stdout}' for ssh key: {secret_key}"
|
||||
raise ValueError(msg)
|
||||
return True
|
||||
else:
|
||||
raise ValueError(f"Invalid ssh key: {secret_key}")
|
||||
msg = f"Invalid ssh key: {secret_key}"
|
||||
raise ValueError(msg)
|
||||
|
||||
@@ -49,9 +49,8 @@ def wait_vm_up(machine_name: str, flake_url: str | None = None) -> None:
|
||||
timeout: float = 600
|
||||
while True:
|
||||
if timeout <= 0:
|
||||
raise TimeoutError(
|
||||
f"qmp socket {socket_file} not found. Is the VM running?"
|
||||
)
|
||||
msg = f"qmp socket {socket_file} not found. Is the VM running?"
|
||||
raise TimeoutError(msg)
|
||||
if socket_file.exists():
|
||||
break
|
||||
sleep(0.1)
|
||||
@@ -66,9 +65,8 @@ def wait_vm_down(machine_name: str, flake_url: str | None = None) -> None:
|
||||
timeout: float = 300
|
||||
while socket_file.exists():
|
||||
if timeout <= 0:
|
||||
raise TimeoutError(
|
||||
f"qmp socket {socket_file} still exists. Is the VM down?"
|
||||
)
|
||||
msg = f"qmp socket {socket_file} still exists. Is the VM down?"
|
||||
raise TimeoutError(msg)
|
||||
sleep(0.1)
|
||||
timeout -= 0.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user