Skip to content

Commit

Permalink
Remove now unused Version.to_string()
Browse files Browse the repository at this point in the history
- `v.to_string(short=False)` was replaced by `str(v)`
- `v.to_string(short=True)` was replaced by `v.short_str()`
  • Loading branch information
zas committed Apr 1, 2024
1 parent e5b28f2 commit 8af9db4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions picard/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ def from_string(cls, version_str):
def valid_identifiers(cls):
return set(cls._identifiers.keys())

def to_string(self, short=False):
if short:
return self.short_str()
else:
return str(self)

def short_str(self):
if self.identifier in {'alpha', 'beta'}:
version = self._replace(identifier=self.identifier[0])
Expand Down
1 change: 0 additions & 1 deletion test/test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def test_version_conversion(self):
)
for v, s in versions:
self.assertEqual(str(v), s)
self.assertEqual(v.to_string(), s)
self.assertEqual(v, Version.from_string(s))

def test_version_conversion_short(self):
Expand Down

0 comments on commit 8af9db4

Please sign in to comment.