ref: Auto-fix ruff rules in tests (#4154)

This commit is contained in:
Christophe Bornet 2024-10-16 17:42:36 +02:00 • committed by GitHub
commit 45c8f98692
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
80 changed files with 359 additions and 456 deletions

View file

@ -4,8 +4,7 @@ import os.path
def get_required_env_var(var: str) -> str:
"""
Get the value of the specified environment variable.
"""Get the value of the specified environment variable.
Args:
var (str): The environment variable to get.
@ -18,7 +17,8 @@ def get_required_env_var(var: str) -> str:
"""
value = os.getenv(var)
if not value:
raise ValueError(f"Environment variable {var} is not set")
msg = f"Environment variable {var} is not set"
raise ValueError(msg)
return value