style: ruff format

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
dw-0
2025-03-08 16:45:20 +01:00
committed by dw-0
parent d3c9bcc38c
commit 41804f0eaa
16 changed files with 137 additions and 76 deletions

View File

@@ -192,5 +192,5 @@ def moonraker_exists(name: str = "") -> List[Moonraker]:
def trunc_string(input_str: str, length: int) -> str:
if len(input_str) > length:
return f"{input_str[:length - 3]}..."
return f"{input_str[: length - 3]}..."
return input_str

View File

@@ -132,8 +132,10 @@ def get_local_tags(repo_path: Path, _filter: str | None = None) -> List[str]:
tags: List[str] = result.split("\n")[:-1]
return sorted(tags, key=lambda x: [int(i) if i.isdigit() else i for i in
re.split(r'(\d+)', x)])
return sorted(
tags,
key=lambda x: [int(i) if i.isdigit() else i for i in re.split(r"(\d+)", x)],
)
except CalledProcessError:
return []

View File

@@ -17,7 +17,9 @@ from core.instance_manager.base_instance import SUFFIX_BLACKLIST
from utils.instance_type import InstanceType
def get_instances(instance_type: type, suffix_blacklist: List[str] = SUFFIX_BLACKLIST) -> List[InstanceType]:
def get_instances(
instance_type: type, suffix_blacklist: List[str] = SUFFIX_BLACKLIST
) -> List[InstanceType]:
from utils.common import convert_camelcase_to_kebabcase
if not isinstance(instance_type, type):