8000 MNT Fix CodeQL · DimitriPapadopoulos/scikit-learn@76b2c95 · GitHub
[go: up one dir, main page]

Skip to content

Commit 76b2c95

Browse files
MNT Fix CodeQL
Inefficient regular expression This part of the regular expression may cause exponential backtracking on strings starting with `.. |` and containing many repetitions of `A`. Co-authored-by: Yao Xiao <108576690+Charlie-XIAO@users.noreply.github.com>
1 parent 5a96c8e commit 76b2c95

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sklearn/tests/test_min_dependencies_readme.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_min_dependencies_readme():
3434
pattern = re.compile(
3535
r"(\.\. \|)"
3636
r"(([A-Za-z]+\-?)+)"
37+
r"(([A-Za-z]+(?:-[A-Za-z]+)*)?)"
3738
r"(MinVersion\| replace::)"
3839
r"( [0-9]+\.[0-9]+(\.[0-9]+)?)"
3940
)

0 commit comments

Comments
 (0)
0