mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2025-04-24 23:28:45 +02:00
Add fix patch for regex PR not yet merged upstream
This commit is contained in:
parent
648865a10d
commit
99033de52f
@ -0,0 +1,20 @@
|
|||||||
|
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
|
Loading…
x
Reference in New Issue
Block a user