diff options
Diffstat (limited to 'gerbonara/utils.py')
-rw-r--r-- | gerbonara/utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gerbonara/utils.py b/gerbonara/utils.py index 586232a..83dc471 100644 --- a/gerbonara/utils.py +++ b/gerbonara/utils.py @@ -68,6 +68,9 @@ class LengthUnit: self.shorthand = shorthand self.factor = this_in_mm + def __hash__(self): + return hash((self.name, self.shorthand, self.factor)) + def convert_from(self, unit, value): """ Convert ``value`` from ``unit`` into this unit. |