File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 60
60
cache : ' pip'
61
61
- name : Install dependencies
62
62
run : |
63
- python3 -m pip install --upgrade pip setuptools setuptools-scm
63
+ python3 -m pip install --upgrade pip setuptools setuptools-scm>=60
64
64
pip install tox tox-gh-actions
65
65
- name : Check
66
66
run : |
Original file line number Diff line number Diff line change @@ -655,8 +655,8 @@ def parse(
655
655
656
656
def replace (self , ** parts : Union [int , Optional [str ]]) -> "Version" :
657
657
"""
658
- Replace one or more parts of a version and return a new
659
- :class:`Version` object, but leave self untouched
658
+ Replace one or more parts of a version and return a new :class:`Version`
659
+ object, but leave self untouched.
660
660
661
661
.. versionadded:: 2.9.0
662
662
Added :func:`Version.replace`
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ class SemVerWithVPrefix(Version):
26
26
"""
27
27
A subclass of Version which allows a "v" prefix
28
28
"""
29
+
29
30
@classmethod
30
31
def parse (cls , version : str ) -> "SemVerWithVPrefix" :
31
32
"""
@@ -46,9 +47,7 @@ def __str__(self) -> str:
46
47
# Reconstruct the tag
47
48
return "v" + super ().__str__ ()
48
49
49
-
50
50
version = SemVerWithVPrefix .parse ("v1.1.0" )
51
51
dev_version = version .replace (prerelease = "dev.0" )
52
52
53
53
assert str (dev_version ) == "v1.1.0-dev.0"
54
-
You can’t perform that action at this time.
0 commit comments