refactor(KIAUH): big refactor of instance handling

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
dw-0
2023-12-26 23:37:35 +01:00
parent 1b4c76d080
commit 9dedf38079
9 changed files with 179 additions and 164 deletions

View File

@@ -207,10 +207,8 @@ class InstanceManager:
return instance_list
def _get_instance_suffix(self, file_path: Path) -> Union[str, None]:
full_name = file_path.name.split(".")[0]
return full_name.split("-")[-1] if "-" in full_name else None
def _get_instance_suffix(self, file_path: Path) -> str:
return file_path.stem.split("-")[-1] if "-" in file_path.stem else ""
def _sort_instance_list(self, s: Union[int, str, None]):
if s is None: