Skip to content

Commit 0ef8cc8

Browse files
authored
Merge pull request #218 from P403n1x87/perf-regex-identifier-check-shallow
perf: fix RegexIdentifier.check regression
2 parents b04de11 + a80cabd commit 0ef8cc8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pywhat/regex_identifier.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import copy
21
import re
32
from typing import Optional
43

@@ -28,7 +27,7 @@ def check(
2827
reg["Boundaryless Regex"] if reg in boundaryless else reg["Regex"]
2928
)
3029
for matched_regex in re.finditer(regex, string, re.MULTILINE):
31-
reg_match = copy.deepcopy(reg)
30+
reg_match = dict(reg)
3231
matched = self.clean_text(matched_regex.group(0))
3332

3433
if (

0 commit comments

Comments
 (0)