Fixed format string quotes

This commit is contained in:
Maximilian Giller 2024-05-06 22:07:30 +02:00
parent 3ced1992a5
commit ab5a192524

View file

@ -29,7 +29,6 @@ leg_capacity_limit_patterns = [
] ]
def get_clusters(data: list[float], min_delta: float) -> dict: def get_clusters(data: list[float], min_delta: float) -> dict:
clusters = {} clusters = {}
for point in data: for point in data:
@ -40,13 +39,13 @@ def get_clusters(data: list[float], min_delta: float) -> dict:
clusters[point] = [point] clusters[point] = [point]
return clusters return clusters
def show_time(): def show_time():
r.post(f"{matrix_clock_api}/time") r.post(f"{matrix_clock_api}/time")
def show_scale(weight: float): def show_scale(weight: float):
r.post(f"{matrix_clock_api}/message", json={ r.post(f"{matrix_clock_api}/message", json={"message": f"{weight:3.1f}kg"})
"message": f"{weight:3.1f}kg"
})
def is_capacity_reached() -> bool: def is_capacity_reached() -> bool:
@ -67,7 +66,10 @@ def is_capacity_reached() -> bool:
return return
is_warning_active = True is_warning_active = True
r.post(f"{matrix_clock_api}/pattern?pattern={highest_limit["pattern"]}&step_ms={highest_limit["duration"]}&contrast=255") r.post(
f"{matrix_clock_api}/pattern?pattern={highest_limit['pattern']}&step_ms={highest_limit['duration']}&contrast=255"
)
def check_for_change(): def check_for_change():
# Check for capicity limits # Check for capicity limits