mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2025-03-09 08:07:46 +01:00
21 lines
738 B
Diff
21 lines
738 B
Diff
From 1c55e1253bbbc8d870ccecd61b1e4d3c4e2c672b Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=C3=85ke=20Forslund?= <ake.forslund@gmail.com>
|
|
Date: Wed, 23 Jun 2021 09:42:49 +0200
|
|
Subject: [PATCH] Fix storing regex as string when cleaned
|
|
|
|
diff --git a/adapt/engine.py b/adapt/engine.py
|
|
index 0f4b6d2..3c373a1 100644
|
|
--- a/adapt/engine.py
|
|
+++ b/adapt/engine.py
|
|
@@ -235,9 +235,9 @@ def default_match_func(regexp):
|
|
self.regular_expressions_entities = [
|
|
r for r in self.regular_expressions_entities if r not in matches
|
|
]
|
|
- self._regex_strings = [
|
|
+ self._regex_strings = {
|
|
r for r in self._regex_strings if r not in matching_patterns
|
|
- ]
|
|
+ }
|
|
|
|
return len(matches) != 0
|