mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Kotlin: Update regex patterns to use raw string notation
Fixes warnings like SyntaxWarning: invalid escape sequence '\S'
This commit is contained in:
@@ -35,10 +35,10 @@ def parse_dbscheme(filename):
|
|||||||
unions[name] = typs
|
unions[name] = typs
|
||||||
|
|
||||||
# tables
|
# tables
|
||||||
for relname, body in re.findall('\n([\w_]+)(\([^)]*\))',
|
for relname, body in re.findall(r'\n([\w_]+)(\([^)]*\))',
|
||||||
dbscheme,
|
dbscheme,
|
||||||
flags=re.DOTALL):
|
flags=re.DOTALL):
|
||||||
columns = list(re.findall('(\S+)\s*:\s*([^\s,]+)(?:\s+(ref)|)', body))
|
columns = list(re.findall(r'(\S+)\s*:\s*([^\s,]+)(?:\s+(ref)|)', body))
|
||||||
tables[relname] = columns
|
tables[relname] = columns
|
||||||
|
|
||||||
parse_dbscheme(dbscheme)
|
parse_dbscheme(dbscheme)
|
||||||
|
|||||||
Reference in New Issue
Block a user