aboutsummaryrefslogtreecommitdiff
path: root/gerbolyze
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-03-05 23:28:09 +0100
committerjaseg <git@jaseg.de>2023-03-05 23:28:09 +0100
commit89fa6fbf83c4be8e2394b456166c228c58428ea6 (patch)
tree369574bc2e483c9cc2f2bc46f88039e4ff4a3401 /gerbolyze
parent7e7f4b1aa66e73d7568787ff2225a87a5e6c34d5 (diff)
downloadgerbolyze-89fa6fbf83c4be8e2394b456166c228c58428ea6.tar.gz
gerbolyze-89fa6fbf83c4be8e2394b456166c228c58428ea6.tar.bz2
gerbolyze-89fa6fbf83c4be8e2394b456166c228c58428ea6.zip
Fix unit tests
Diffstat (limited to 'gerbolyze')
-rwxr-xr-xgerbolyze/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerbolyze/__init__.py b/gerbolyze/__init__.py
index fcae543..e817471 100755
--- a/gerbolyze/__init__.py
+++ b/gerbolyze/__init__.py
@@ -151,7 +151,7 @@ class ClickSizeParam(click.ParamType):
if isinstance(value, tuple):
return value
- if not (m := re.match('([0-9]+\.?[0-9]*)(mm|cm|in)?[xX*/,×]([0-9]+\.?[0-9]*)(mm|cm|in)?', value)):
+ if not (m := re.match(r'([0-9]+\.?[0-9]*)(mm|cm|in)?[xX*/,×]([0-9]+\.?[0-9]*)(mm|cm|in)?', value)):
self.fail('Size must have format [width]x[height][unit]. The unit can be mm, cm or in. The unit is optional and defaults to mm.', param=param, ctx=ctx)
w, unit1, h, unit2 = m.groups()
@@ -314,7 +314,7 @@ def parse_subtract_script(script, default_dilation=0.1, default_script=DEFAULT_S
continue
line = line.lower()
- line = re.sub('\s', '', line)
+ line = re.sub(r'\s', '', line)
# out.copper -= in.copper+0.1
varname = r'([a-z]+\.[a-z]+)'