ruff format fix

This commit is contained in:
r0b2g1t
2026-09-16 16:55:54 +02:00
parent 6fb84765c4
commit 60b77f6da2
3 changed files with 2 additions and 6 deletions
+1 -3
View File
@@ -807,9 +807,7 @@ class ConfigEOS(SingletonMixin, SettingsEOSDefaults):
) )
elif isinstance(setting, list): elif isinstance(setting, list):
setting = [ setting = [
item.model_dump( item.model_dump(exclude_none=True, exclude_unset=True, exclude_computed_fields=True)
exclude_none=True, exclude_unset=True, exclude_computed_fields=True
)
if isinstance(item, SettingsBaseModel) if isinstance(item, SettingsBaseModel)
else item else item
for item in setting for item in setting
-1
View File
@@ -113,7 +113,6 @@ def merge_models(source: BaseModel, update_dict: dict[str, Any]) -> dict[str, An
Returns: Returns:
dict[str, Any]: Merged dictionary representing combined model data. dict[str, Any]: Merged dictionary representing combined model data.
""" """
source_dict = source.model_dump( source_dict = source.model_dump(
exclude_unset=True, exclude_unset=True,
exclude_computed_fields=True, exclude_computed_fields=True,
+1 -2
View File
@@ -81,8 +81,7 @@ def validate_ip_or_hostname(value: str) -> str:
raise ValueError(f"Not a valid hostname: {value}") raise ValueError(f"Not a valid hostname: {value}")
hostname_regex = re.compile( hostname_regex = re.compile(
r"^(?=.{1,253}$)(?!-)[A-Z\d-]{1,63}(?<!-)" r"^(?=.{1,253}$)(?!-)[A-Z\d-]{1,63}(?<!-)" r"(?:\.(?!-)[A-Z\d-]{1,63}(?<!-))*\.?$",
r"(?:\.(?!-)[A-Z\d-]{1,63}(?<!-))*\.?$",
re.IGNORECASE, re.IGNORECASE,
) )
if not bool(hostname_regex.fullmatch(value)): if not bool(hostname_regex.fullmatch(value)):