Updated python packages

This commit is contained in:
Donkie
2023-08-28 21:10:07 +02:00
parent c3779c4d2c
commit 871e5282e5
8 changed files with 331 additions and 339 deletions

View File

@@ -157,8 +157,8 @@ class Spool(BaseModel):
"""Create a new Pydantic spool object from a database spool object."""
filament = Filament.from_db(item.filament)
remaining_weight: Optional[float] = None # noqa: FA100
remaining_length: Optional[float] = None # noqa: FA100
remaining_weight: Optional[float] = None
remaining_length: Optional[float] = None
if filament.weight is not None:
remaining_weight = max(filament.weight - item.used_weight, 0)
remaining_length = length_from_weight(