Skip to content

Commit fcee8f1

Browse files
committed
fixing ruff complaints
1 parent 19304b8 commit fcee8f1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

omc3_gui/segment_by_segment/measurement_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def tooltip(self) -> str:
100100
(self.get_label(f.name), getattr(self, f.name)) for f in fields(self)
101101
if not f.name.startswith("_")
102102
]
103-
l = max(len(name) for name, _ in parts)
104-
return "\n".join(f"{name:{l}s}: {value}" for name, value in parts if value is not None)
103+
size = max(len(name) for name, _ in parts)
104+
return "\n".join(f"{name:{size}s}: {value}" for name, value in parts if value is not None)
105105

106106
# Segment Control ----------------------------------------------------------
107107
def remove_segment(self, segment: SegmentDataModel):

omc3_gui/ui_components/dataclass_ui/controller.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919

2020
from omc3_gui.ui_components import colors, file_dialogs
2121
from omc3_gui.ui_components.dataclass_ui import view, model
22-
from omc3_gui.ui_components.dataclass_ui.model import FieldUIDef, FilePath, DirectoryPath # paths need to be known by `get_dataclass_types`
23-
from omc3_gui.ui_components.dataclass_ui.model import FieldUIDef
22+
from omc3_gui.ui_components.dataclass_ui.model import FieldUIDef, FilePath, DirectoryPath # noqa: F401 paths need to be known by `get_dataclass_types`
2423
from omc3_gui.ui_components.widgets import HorizontalSeparator
2524
from typing import get_type_hints, TYPE_CHECKING
2625

0 commit comments

Comments
 (0)