Skip to content

Commit 137f9e7

Browse files
committed
Python: Adress review comments
- make qldoc accurate - fix ql4ql alert
1 parent d3c24ba commit 137f9e7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

python/ql/lib/semmle/python/regexp/internal/ParseRegExp.qll

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,8 @@ class RegExp extends Expr instanceof StrConst {
683683
* Holds if a parse mode starts between `start` and `end`.
684684
*/
685685
private predicate flag_group_start(int start, int end) {
686-
exists(int no_modes_end |
687-
this.flag_group_start_no_modes(start, no_modes_end) and
688-
end = max(int i | this.mode_character(start, i) | i + 1)
689-
)
686+
this.flag_group_start_no_modes(start, _) and
687+
end = max(int i | this.mode_character(start, i) | i + 1)
690688
}
691689

692690
/**
@@ -712,8 +710,8 @@ class RegExp extends Expr instanceof StrConst {
712710
}
713711

714712
/**
715-
* Holds if a parse mode group is between `start` and `end`, and includes the
716-
* mode flag `c`. For example the following span, with mode flag `i`:
713+
* Holds if a parse mode group includes the mode flag `c`.
714+
* For example the following parse mode group, with mode flag `i`:
717715
* ```
718716
* (?i)
719717
* ```

0 commit comments

Comments
 (0)