summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/utils.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-19 00:36:05 +0100
committerjaseg <git@jaseg.de>2022-01-19 00:36:05 +0100
commit9e86bf6b3e92706c190283af83d71999fee03442 (patch)
treee3bb083ae976859df953d9d16d2eb5f628f0ab45 /gerbonara/gerber/utils.py
parentd85790bc6d40deb1d52cc5d8a4c178f664635625 (diff)
downloadgerbonara-9e86bf6b3e92706c190283af83d71999fee03442.tar.gz
gerbonara-9e86bf6b3e92706c190283af83d71999fee03442.tar.bz2
gerbonara-9e86bf6b3e92706c190283af83d71999fee03442.zip
Fix old gerber tests
Diffstat (limited to 'gerbonara/gerber/utils.py')
-rw-r--r--gerbonara/gerber/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gerbonara/gerber/utils.py b/gerbonara/gerber/utils.py
index 533f0a2..f7df4ed 100644
--- a/gerbonara/gerber/utils.py
+++ b/gerbonara/gerber/utils.py
@@ -60,6 +60,13 @@ class LengthUnit:
else:
return id(self) == id(other)
+ # This class is a singleton, we don't want copies around
+ def __copy__(self):
+ return self
+
+ def __deepcopy__(self, memo):
+ return self
+
MILLIMETERS_PER_INCH = 25.4
Inch = LengthUnit('inch', 'in', MILLIMETERS_PER_INCH)