From d51f29c31118a3d10a4ee0eb4dc648da6dbc68bd Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 15 Nov 2021 14:30:04 +0100 Subject: remove unused functions --- src/pydrilla/pydrilla.py | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'src/pydrilla') diff --git a/src/pydrilla/pydrilla.py b/src/pydrilla/pydrilla.py index caf05a2..b5513b9 100644 --- a/src/pydrilla/pydrilla.py +++ b/src/pydrilla/pydrilla.py @@ -157,51 +157,6 @@ def version_string(ver, rev=None): ''' return '.'.join([str(n) for n in ver]) + ('' if rev is None else f'-{rev}') -### pad_versions() and compare_versions() likely won't be needed - -# def pad_versions(ver1, ver2): -# ''' -# Each of the arguments is an array of integers. If one of the arrays is -# shorter than the other, right-pad it with zeroes to make it the same -# length as the other one. - -# Returns a tuple of *new* arrays. Doesn't modify its arguments. -# ''' -# if len(ver1) < len(ver2): -# ver2, ver1 = pad_versions(ver2, ver1) -# else: -# ver2 = [*ver2, *([0] * (len(ver1) - len(ver2)))] -# ver1 = [*ver1] - -# return ver1, ver2 - -# def compare_versions(ver1, ver2, rev1=1, rev2=1): -# ''' -# ver1 and ver2 are arrays of integers, with major version number being the -# first array item. If versions specified by arrays of different length need -# to be compared, the shorter array gets padded with zeroes on the right. -# This means that for example version 1.3 could be given as both [1, 3] and -# [1, 3, 0, 0] (aka 1.3.0.0) and either would mean the same. - -# rev1 and rev2 are revision numbers. They are appended to padded ver1 and -# ver2 arrays respectively before comparison. - -# This function returns -1, 0 or 1 when the first ver1 designates -# respectively a version lower than, equal to or greater than the one in -# ver2. -# ''' -# ver1, ver2 = pad_versions(ver1, ver2) -# ver1.append(rev1) -# ver2.append(rev2) - -# for n1, n2 in zip(ver1, ver2): -# if n1 < n2: -# return -1 -# if n1 > n2: -# return 1 - -# return 0 - class VersionedContentItem: '''Stores definitions of multiple versions of website content item.''' def __init__(self): -- cgit v1.2.3