fatf.utils.tools
.at_least_verion¶
-
fatf.utils.tools.
at_least_verion
(minimum_requirement: List[int], package_version: List[int]) → bool[source]¶ Checks if the
package_version
satisfies theminimum_requirement
.Both
package_version
andminimum_requirement
are lists of integers representing Python package versions, e.g.[1, 16, 4]
. This function returnsTrue
if thepackage_version
is at least as high as theminimum_requirement
version.The
package_version
list has to be at least as long as theminimum_requirement
list, otherwise aValueError
exception is raised.- Parameters
- minimum_requirementList[integer]
The minimum Python package version that is required.
- package_versionlist[integer]
The Python package version to be tested.
- Returns
- is_compatibleboolean
True
if thepackage_version
satisfies theminimum_requirement
,False
otherwise.
- Raises
- TypeError
Either of the parameters is not a list or the elements of the lists are not integers.
- ValueError
Raised when either of the input lists is empty and when the
package_version
list is shorter than theminimum_requirement
list.