From a98093417b47ce497dc51adc7237cd30591f43b3 Mon Sep 17 00:00:00 2001 From: Neda Moeini <neda.moeini@geant.org> Date: Thu, 7 Dec 2023 10:05:45 +0100 Subject: [PATCH] Made ruff happy. --- gso/utils/helpers.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gso/utils/helpers.py b/gso/utils/helpers.py index 8bafd81c..c5316a05 100644 --- a/gso/utils/helpers.py +++ b/gso/utils/helpers.py @@ -75,9 +75,9 @@ def available_interfaces_choices(router_id: UUID, speed: str) -> Choice | None: def available_interfaces_choices_including_current_members( - router_id: UUID, - speed: str, - interfaces: list[IptrunkInterfaceBlock], + router_id: UUID, + speed: str, + interfaces: list[IptrunkInterfaceBlock], ) -> Choice | None: """Return a list of available interfaces for a given router and speed including the current members. @@ -288,7 +288,9 @@ def validate_interface_name_list(interface_name_list: list, vendor: str) -> list pattern = re.compile(r"^(ge|et|xe)-[0-9]/[0-9]/[0-9]$") for interface in interface_name_list: if not bool(pattern.match(interface.interface_name)): - raise ValueError( - f"Invalid interface name. The interface name should be of format: " - f"xe-1/0/0. Got: [{interface.interface_name}]") + error_msg = ( + f"Invalid interface name. The interface name should be of format: xe-1/0/0. " + f"Got: [{interface.interface_name}]" + ) + raise ValueError(error_msg) return interface_name_list -- GitLab