diff mercurial/util.py @ 44021:6d3b67a837a6

cleanup: drop redundant character escapes from `[]` character sets Flagged by PyCharm. Most special characters lose their special meaning inside square brackets. The `-` in util.py doesn't need to be escaped because it is the last character in the set. Differential Revision: https://phab.mercurial-scm.org/D7766
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 28 Dec 2019 01:35:05 -0500
parents f9d29e1d3354
children 8ed8dfbeabb9
line wrap: on
line diff
--- a/mercurial/util.py	Sat Dec 28 01:12:19 2019 -0500
+++ b/mercurial/util.py	Sat Dec 28 01:35:05 2019 -0500
@@ -1165,7 +1165,7 @@
     """
     if not v:
         v = version()
-    m = remod.match(br'(\d+(?:\.\d+){,2})[\+-]?(.*)', v)
+    m = remod.match(br'(\d+(?:\.\d+){,2})[+-]?(.*)', v)
     if not m:
         vparts, extra = b'', v
     elif m.group(2):