Skip to content

Commit 24e5350

Browse files
authored
make the public/base_version comparison clearer (#818)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent f655175 commit 24e5350

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/packaging/version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ def public(self) -> str:
350350
'1.2.3'
351351
>>> Version("1.2.3+abc").public
352352
'1.2.3'
353-
>>> Version("1.2.3+abc.dev1").public
354-
'1.2.3'
353+
>>> Version("1!1.2.3dev1+abc").public
354+
'1!1.2.3.dev1'
355355
"""
356356
return str(self).split("+", 1)[0]
357357

@@ -363,7 +363,7 @@ def base_version(self) -> str:
363363
'1.2.3'
364364
>>> Version("1.2.3+abc").base_version
365365
'1.2.3'
366-
>>> Version("1!1.2.3+abc.dev1").base_version
366+
>>> Version("1!1.2.3dev1+abc").base_version
367367
'1!1.2.3'
368368
369369
The "base version" is the public version of the project without any pre or post

0 commit comments

Comments
 (0)