[refactor] rewrote/simplified getQualitiesfromxml code, used function already implemented in phases.py

This commit is contained in:
2022-03-16 16:00:14 +01:00
parent 3cd17ff364
commit dd685d5d5e
5 changed files with 94 additions and 269 deletions
+1 -1
View File
@@ -1320,7 +1320,7 @@ def get_quality_class(uncertainty, weight_classes):
:return: quality of pick (0-4)
:rtype: int
"""
if not uncertainty: return max(weight_classes)
if not uncertainty: return len(weight_classes)
try:
# create generator expression containing all indices of values in weight classes that are >= than uncertainty.
# call next on it once to receive first value