Skip to content

Commit 1f131ec

Browse files
committed
Require setuptools_scm>60, slightly reformat code
1 parent 4987042 commit 1f131ec

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.github/workflows/python-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
cache: 'pip'
6161
- name: Install dependencies
6262
run: |
63-
python3 -m pip install --upgrade pip setuptools setuptools-scm
63+
python3 -m pip install --upgrade pip setuptools setuptools-scm>=60
6464
pip install tox tox-gh-actions
6565
- name: Check
6666
run: |

src/semver/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,8 @@ def parse(
655655

656656
def replace(self, **parts: Union[int, Optional[str]]) -> "Version":
657657
"""
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.
660660
661661
.. versionadded:: 2.9.0
662662
Added :func:`Version.replace`

tests/test_subclass.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class SemVerWithVPrefix(Version):
2626
"""
2727
A subclass of Version which allows a "v" prefix
2828
"""
29+
2930
@classmethod
3031
def parse(cls, version: str) -> "SemVerWithVPrefix":
3132
"""
@@ -46,9 +47,7 @@ def __str__(self) -> str:
4647
# Reconstruct the tag
4748
return "v" + super().__str__()
4849

49-
5050
version = SemVerWithVPrefix.parse("v1.1.0")
5151
dev_version = version.replace(prerelease="dev.0")
5252

5353
assert str(dev_version) == "v1.1.0-dev.0"
54-

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy