Skip to content

Commit

Permalink
CLN: Make two regex strings raw to suppress warning
Browse files Browse the repository at this point in the history
  • Loading branch information
NickleDave committed Feb 27, 2023
1 parent 58bb6f1 commit aca85f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crowsetta/_vendor/textgrid/textgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit aca85f1

Please sign in to comment.