mirror of
https://github.com/fergalmoran/picard.git
synced 2025-12-22 09:18:18 +00:00
Remove now unused Version.to_string()
- `v.to_string(short=False)` was replaced by `str(v)` - `v.to_string(short=True)` was replaced by `v.short_str()`
This commit is contained in:
@@ -77,12 +77,6 @@ class Version(namedtuple('VersionBase', 'major minor patch identifier revision')
|
||||
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])
|
||||
|
||||
@@ -52,7 +52,6 @@ class VersionsTest(PicardTestCase):
|
||||
)
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user