daemon/gui: coverted remaining usages of old string formatting to f strings
This commit is contained in:
parent
4dba1bbe32
commit
899800b925
3 changed files with 10 additions and 10 deletions
|
@ -54,8 +54,8 @@ class ConfigServiceDependencies:
|
|||
|
||||
if self.started != set(self.node_services):
|
||||
raise ValueError(
|
||||
"failure to start all services: %s != %s"
|
||||
% (self.started, self.node_services.keys())
|
||||
f"failure to start all services: {self.started} != "
|
||||
f"{self.node_services.keys()}"
|
||||
)
|
||||
|
||||
return paths
|
||||
|
@ -96,14 +96,14 @@ class ConfigServiceDependencies:
|
|||
for service_name in current_service.dependencies:
|
||||
if service_name not in self.node_services:
|
||||
raise ValueError(
|
||||
"required dependency was not included in node services: %s"
|
||||
% service_name
|
||||
"required dependency was not included in node "
|
||||
f"services: {service_name}"
|
||||
)
|
||||
|
||||
if service_name in self.visiting:
|
||||
raise ValueError(
|
||||
"cyclic dependency at service(%s): %s"
|
||||
% (current_service.name, service_name)
|
||||
f"cyclic dependency at service({current_service.name}): "
|
||||
f"{service_name}"
|
||||
)
|
||||
|
||||
if service_name not in self.visited:
|
||||
|
|
|
@ -29,7 +29,7 @@ class CanvasTooltip:
|
|||
*,
|
||||
pad: tuple[int, int, int, int] = (5, 3, 5, 3),
|
||||
waittime: int = 400,
|
||||
wraplength: int = 600
|
||||
wraplength: int = 600,
|
||||
) -> None:
|
||||
# in miliseconds, originally 500
|
||||
self.waittime: int = waittime
|
||||
|
@ -64,7 +64,7 @@ class CanvasTooltip:
|
|||
label: ttk.Label,
|
||||
*,
|
||||
tip_delta: tuple[int, int] = (10, 5),
|
||||
pad: tuple[int, int, int, int] = (5, 3, 5, 3)
|
||||
pad: tuple[int, int, int, int] = (5, 3, 5, 3),
|
||||
):
|
||||
c = canvas
|
||||
s_width, s_height = c.winfo_screenwidth(), c.winfo_screenheight()
|
||||
|
@ -112,7 +112,7 @@ class CanvasTooltip:
|
|||
)
|
||||
label.grid(padx=(pad[0], pad[2]), pady=(pad[1], pad[3]), sticky=tk.NSEW)
|
||||
x, y = tip_pos_calculator(canvas, label, pad=pad)
|
||||
self.tw.wm_geometry("+%d+%d" % (x, y))
|
||||
self.tw.wm_geometry(f"+{x:d}+{y:d}")
|
||||
|
||||
def hide(self) -> None:
|
||||
if self.tw:
|
||||
|
|
|
@ -42,7 +42,7 @@ class Tooltip:
|
|||
y += self.widget.winfo_rooty() + 32
|
||||
self.tw = tk.Toplevel(self.widget)
|
||||
self.tw.wm_overrideredirect(True)
|
||||
self.tw.wm_geometry("+%d+%d" % (x, y))
|
||||
self.tw.wm_geometry(f"+{x:d}+{y:d}")
|
||||
self.tw.rowconfigure(0, weight=1)
|
||||
self.tw.columnconfigure(0, weight=1)
|
||||
frame = ttk.Frame(self.tw, style=Styles.tooltip_frame, padding=3)
|
||||
|
|
Loading…
Reference in a new issue