diff options
author | Éric Araujo <merwok@netwok.org> | 2011-10-04 23:46:37 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-10-04 23:46:37 (GMT) |
commit | c4637714b0d1c80a8a7d40a590b1a113bf112ffd (patch) | |
tree | 0c02b653bcb7d6bc63c2ac3d6a3f194a74013547 /Lib/packaging/version.py | |
parent | 763cc6eaee612d803815a5eea28b95c39f6dce48 (diff) | |
download | cpython-c4637714b0d1c80a8a7d40a590b1a113bf112ffd.zip cpython-c4637714b0d1c80a8a7d40a590b1a113bf112ffd.tar.gz cpython-c4637714b0d1c80a8a7d40a590b1a113bf112ffd.tar.bz2 |
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.
Diffstat (limited to 'Lib/packaging/version.py')
-rw-r--r-- | Lib/packaging/version.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/packaging/version.py b/Lib/packaging/version.py index 0eaf80b..7d812bb 100644 --- a/Lib/packaging/version.py +++ b/Lib/packaging/version.py @@ -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 |