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_versionsatisfies theminimum_requirement.Both
package_versionandminimum_requirementare lists of integers representing Python package versions, e.g.[1, 16, 4]. This function returnsTrueif thepackage_versionis at least as high as theminimum_requirementversion.The
package_versionlist has to be at least as long as theminimum_requirementlist, otherwise aValueErrorexception 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
Trueif thepackage_versionsatisfies theminimum_requirement,Falseotherwise.
- 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_versionlist is shorter than theminimum_requirementlist.