Skip to content

Commit

Permalink
Fix regex in utils.py (#482)
Browse files Browse the repository at this point in the history
Convert regex string into a raw string so that `\s` is interpreted correctly. Also removes the warning `SyntaxWarning: invalid escape sequence '\s'`
  • Loading branch information
craymichael authored May 23, 2024
1 parent 70b5be8 commit bd45454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scdl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def size_in_bytes(insize):
't': 1024 ** 4,
'p': 1024 ** 5,
}
match = re.search('^\s*([0-9\.]+)\s*([kmgtp])?', insize, re.I)
match = re.search(r'^\s*([0-9\.]+)\s*([kmgtp])?', insize, re.I)

if match is None:
raise ValueError('match not found')
Expand Down

0 comments on commit bd45454

Please sign in to comment.