Skip to content

Commit a6701ce

Browse files
committed
Kotlin: Update regex patterns to use raw string notation
Fixes warnings like SyntaxWarning: invalid escape sequence '\S'
1 parent 14a362d commit a6701ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/kotlin-extractor/generate_dbscheme.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ def parse_dbscheme(filename):
3535
unions[name] = typs
3636

3737
# tables
38-
for relname, body in re.findall('\n([\w_]+)(\([^)]*\))',
38+
for relname, body in re.findall(r'\n([\w_]+)(\([^)]*\))',
3939
dbscheme,
4040
flags=re.DOTALL):
41-
columns = list(re.findall('(\S+)\s*:\s*([^\s,]+)(?:\s+(ref)|)', body))
41+
columns = list(re.findall(r'(\S+)\s*:\s*([^\s,]+)(?:\s+(ref)|)', body))
4242
tables[relname] = columns
4343

4444
parse_dbscheme(dbscheme)

0 commit comments

Comments
 (0)