Use list comprehension instead of for

This commit is contained in:
bom 2023-05-11 15:03:32 +02:00
parent 9e7bef2066
commit 64116edcb4

View file

@ -13,9 +13,7 @@ class Version(Validateable):
suffix_str = None
if len(snapshot_parsed) > 1:
suffix_str = snapshot_parsed[1]
version_no_parsed = []
for x in version_str.split("."):
version_no_parsed += [int(x)]
version_no_parsed = [int(x) for x in version_str.split(".")]
return cls(
version_no_parsed,
suffix_str,