diff options
| author | Kaalleen <reni@allenka.de> | 2023-05-15 19:19:44 +0200 |
|---|---|---|
| committer | Kaalleen <reni@allenka.de> | 2023-05-15 19:19:44 +0200 |
| commit | d655aa1e1f0a9d4c655698f6db852e3f6947f5d2 (patch) | |
| tree | 36a90a0fceb3978d9f928de60f4a648361fb483b | |
| parent | e8a6516471a1f105eb8bcab266bc8fe37e27fee9 (diff) | |
troubleshoot: read numbers with exponent
| -rw-r--r-- | lib/elements/fill_stitch.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py index 912f3ba6..62bd1aca 100644 --- a/lib/elements/fill_stitch.py +++ b/lib/elements/fill_stitch.py @@ -607,13 +607,13 @@ class FillStitch(EmbroideryElement): def validation_errors(self): if not self.shape_is_valid(self.shape): why = explain_validity(self.shape) - message, x, y = re.findall(r".+?(?=\[)|-?\d+(?:\.\d+)?", why) + message, x, y = re.match(r"(?P<message>.+)\[(?P<x>.+)\s(?P<y>.+)\]", why).groups() yield InvalidShapeError((x, y)) def validation_warnings(self): # noqa: C901 if not self.shape_is_valid(self.original_shape): why = explain_validity(self.original_shape) - message, x, y = re.findall(r".+?(?=\[)|-?\d+(?:\.\d+)?", why) + message, x, y = re.match(r"(?P<message>.+)\[(?P<x>.+)\s(?P<y>.+)\]", why).groups() if "Hole lies outside shell" in message: yield UnconnectedWarning((x, y)) else: |
