ruff: enable warning lints

This commit is contained in:
Jörg Thalheim
2024-10-23 10:20:43 +02:00
committed by Mic92
parent 2f9981c510
commit 4af1954abf
15 changed files with 30 additions and 15 deletions

View File

@@ -9,7 +9,11 @@ class Error(Exception):
def is_valid_age_key(secret_key: str) -> bool:
# Run the age-keygen command with the -y flag to check the key format
result = subprocess.run(
["age-keygen", "-y"], input=secret_key, capture_output=True, text=True
["age-keygen", "-y"],
input=secret_key,
capture_output=True,
text=True,
check=False,
)
if result.returncode == 0:
@@ -25,7 +29,10 @@ def is_valid_ssh_key(secret_key: str, ssh_pub: str) -> bool:
temp.flush()
# Run the ssh-keygen command with the -y flag to check the key format
result = subprocess.run(
["ssh-keygen", "-y", "-f", temp.name], capture_output=True, text=True
["ssh-keygen", "-y", "-f", temp.name],
capture_output=True,
text=True,
check=False,
)
if result.returncode == 0: