mirror of
https://github.com/davidhalter/parso.git
synced 2026-02-10 20:01:28 +08:00
Use escapes for some regex expressions.
This commit is contained in:
@@ -134,7 +134,7 @@ class Grammar(object):
|
||||
|
||||
|
||||
def _parse_version(version):
|
||||
match = re.match('(\d+)(?:\.(\d)(?:\.\d+)?)?$', version)
|
||||
match = re.match(r'(\d+)(?:\.(\d)(?:\.\d+)?)?$', version)
|
||||
if match is None:
|
||||
raise ValueError('The given version is not in the right format. '
|
||||
'Use something like "3.2" or "3".')
|
||||
|
||||
Reference in New Issue
Block a user