Cosmetic fixes for whitespace and a regex in packaging.

The goal of the regex is to catch a (alpha), b (beta), c or rc
(release candidate), so the existing pattern puzzled me. Tests were
OK before and after the change.
This commit is contained in:
Éric Araujo 2011-10-05 01:46:37 +02:00
parent 763cc6eaee
commit c4637714b0
2 changed files with 5 additions and 5 deletions

View file

@ -253,7 +253,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