Skip to content

Commit 85c8c05

Browse files
NikolausKurczhiaselhans
authored andcommitted
hash cashe fix by Simon
1 parent e2213d7 commit 85c8c05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openglider/vector/unit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def __format__(self, spec: str) -> str:
111111
return f"{value.__format__(spec)}{unit}"
112112

113113
def __hash__(self) -> int:
114-
return hash(self.value)
114+
return hash((self.value, self.unit, self.__class__.__name__))
115115

116116
def __apply_operator(self, other: Any, operator: Callable[[float, float], float]) -> Self:
117117
new_value: float | None = None

0 commit comments

Comments
 (0)