Fix pre-release matching regex character class

Previously matched any single character from `abc|r` (with duplicate
specification of `c`).  Now matches any single character from `abc` or
the two character sequence `rc`.

I guess this was the intent, anyway.
This commit is contained in:
Jean-Paul Calderone 2018-04-26 15:20:27 -04:00
parent 6b16afaa2e
commit 8d4d000132
1 changed files with 1 additions and 2 deletions

View File

@ -254,7 +254,7 @@ def suggest_normalized_version(s):
# if we have something like "b-2" or "a.2" at the end of the
# version, that is pobably beta, alpha, etc
# let's remove the dash or dot
rs = re.sub(r"([abc|rc])[\-\.](\d+)$", r"\1\2", rs)
rs = re.sub(r"([abc]|rc)[\-\.](\d+)$", r"\1\2", rs)
# 1.0-dev-r371 -> 1.0.dev371
# 0.1-dev-r79 -> 0.1.dev79
@ -324,4 +324,3 @@ def suggest_normalized_version(s):
except IrrationalVersionError:
pass
return None