summaryrefslogtreecommitdiff
path: root/gerbonara/utils.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-02-19 23:42:17 +0100
committerjaseg <git@jaseg.de>2023-02-19 23:42:17 +0100
commita374483998baff2fab4c43027c83f8bf97e5fdf5 (patch)
tree090289b0aa8ea1fe7e425a9d39281cc24e44eae9 /gerbonara/utils.py
parentf64b03efc752b682b1cbe8cfb114f19e3362ef76 (diff)
downloadgerbonara-a374483998baff2fab4c43027c83f8bf97e5fdf5.tar.gz
gerbonara-a374483998baff2fab4c43027c83f8bf97e5fdf5.tar.bz2
gerbonara-a374483998baff2fab4c43027c83f8bf97e5fdf5.zip
cli: First draft of most of the CLI
Diffstat (limited to 'gerbonara/utils.py')
-rw-r--r--gerbonara/utils.py3
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.