From a374483998baff2fab4c43027c83f8bf97e5fdf5 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 19 Feb 2023 23:42:17 +0100 Subject: cli: First draft of most of the CLI --- gerbonara/utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gerbonara/utils.py') 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. -- cgit