Merge pull request #4739 from RasmusWL/recrete-regex-fp

Python: Add regex FP with + for flags
This commit is contained in:
Taus
2020-12-02 13:01:47 +01:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -7,4 +7,5 @@
| 50 | VERBOSE |
| 51 | UNICODE |
| 52 | UNICODE |
| 64 | MULTILINE |
| 56 | VERBOSE |
| 68 | MULTILINE |

View File

@@ -1,5 +1,5 @@
import re
# 0123456789ABCDEF
# 0123456789ABCDEF
re.compile(r'012345678')
re.compile(r'(\033|~{)')
re.compile(r'\A[+-]?\d+')
@@ -50,6 +50,10 @@ re.compile("", re.VERBOSE|re.DOTALL)
re.compile("", flags=re.VERBOSE|re.IGNORECASE)
re.search("", None, re.UNICODE)
x = re.search("", flags=re.UNICODE)
# using addition for flags was reported as FP in https://github.com/github/codeql/issues/4707
re.compile("", re.VERBOSE+re.DOTALL) # TODO: Currently not recognized with Mode.ql
# re.X is an alias for re.VERBOSE
re.compile("", re.X)
#empty choice
re.compile(r'|x')