Skip to content

Commit 25cb52a

Browse files
committed
Python: Fix inefficient string comparison
1 parent 8ec414d commit 25cb52a

File tree

1 file changed

+4
-5
lines changed
  • python/ql/test/extractor-tests/flags

1 file changed

+4
-5
lines changed
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
21
import python
32

43
from string k, string v
5-
where k.prefix(8) = "options." and
6-
not k.prefix(14) = "options.verbos" and
7-
py_flags_versioned(k, v, _)
4+
where
5+
not k.matches("options.%") and
6+
not k.matches("options.verbos%") and
7+
py_flags_versioned(k, v, _)
88
select k, v
9-

0 commit comments

Comments
 (0)