From aca85f1818565ecb9c8ef5cb5a14f83586e124cf Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Sun, 26 Feb 2023 21:45:36 -0500 Subject: [PATCH] CLN: Make two regex strings raw to suppress warning --- src/crowsetta/_vendor/textgrid/textgrid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crowsetta/_vendor/textgrid/textgrid.py b/src/crowsetta/_vendor/textgrid/textgrid.py index 9032a716..65fd1fbe 100644 --- a/src/crowsetta/_vendor/textgrid/textgrid.py +++ b/src/crowsetta/_vendor/textgrid/textgrid.py @@ -559,7 +559,7 @@ def parse_line(line, short, to_round): def parse_header(source): header = source.readline() # header junk - m = re.match('File type = "([\w ]+)"', header) + m = re.match(r'File type = "([\w ]+)"', header) if m is None or not m.groups()[0].startswith('ooTextFile'): raise TextGridError('The file could not be parsed as a Praat text file as it is lacking a proper header.') @@ -807,7 +807,7 @@ def read(self, f, samplerate, round_digits=DEFAULT_MLF_PRECISION): source.readline() # header while True: # loop over text - name = re.match('\"(.*)\"', source.readline().rstrip()) + name = re.match(r'\"(.*)\"', source.readline().rstrip()) if name: name = name.groups()[0] grid = TextGrid(name)