@@ -152,9 +152,6 @@ def compare_user_version_with_target_version(self, index):
152
152
153
153
target_version_parts = self .split_semantic_version (target_version )
154
154
user_version_parts = self .split_semantic_version (user_version )
155
- if not user_version_parts :
156
- return None
157
-
158
155
user_version_parts_len = len (user_version_parts )
159
156
160
157
for (idx , _ ) in enumerate (target_version_parts ):
@@ -406,8 +403,7 @@ def semver_equal_evaluator(self, index):
406
403
None:
407
404
- if the user version value is not string type or is null.
408
405
"""
409
- return self .compare_user_version_with_target_version (
410
- index ) == 0 if self .compare_user_version_with_target_version (index ) else None
406
+ return self .compare_user_version_with_target_version (index ) == 0
411
407
412
408
def semver_greater_than_evaluator (self , index ):
413
409
""" Evaluate the given semantic version greater than match target version for the user version.
@@ -422,8 +418,7 @@ def semver_greater_than_evaluator(self, index):
422
418
None:
423
419
- if the user version value is not string type or is null.
424
420
"""
425
- return self .compare_user_version_with_target_version (
426
- index ) > 0 if self .compare_user_version_with_target_version (index ) else None
421
+ return self .compare_user_version_with_target_version (index ) > 0
427
422
428
423
def semver_less_than_evaluator (self , index ):
429
424
""" Evaluate the given semantic version less than match target version for the user version.
@@ -438,8 +433,7 @@ def semver_less_than_evaluator(self, index):
438
433
None:
439
434
- if the user version value is not string type or is null.
440
435
"""
441
- return self .compare_user_version_with_target_version (
442
- index ) < 0 if self .compare_user_version_with_target_version (index ) else None
436
+ return self .compare_user_version_with_target_version (index ) < 0
443
437
444
438
def semver_less_than_or_equal_evaluator (self , index ):
445
439
""" Evaluate the given semantic version less than or equal to match target version for the user version.
@@ -454,8 +448,7 @@ def semver_less_than_or_equal_evaluator(self, index):
454
448
None:
455
449
- if the user version value is not string type or is null.
456
450
"""
457
- return self .compare_user_version_with_target_version (
458
- index ) <= 0 if self .compare_user_version_with_target_version (index ) else None
451
+ return self .compare_user_version_with_target_version (index ) <= 0
459
452
460
453
def semver_greater_than_or_equal_evaluator (self , index ):
461
454
""" Evaluate the given semantic version greater than or equal to match target version for the user version.
@@ -470,8 +463,7 @@ def semver_greater_than_or_equal_evaluator(self, index):
470
463
None:
471
464
- if the user version value is not string type or is null.
472
465
"""
473
- return self .compare_user_version_with_target_version (
474
- index ) >= 0 if self .compare_user_version_with_target_version (index ) else None
466
+ return self .compare_user_version_with_target_version (index ) >= 0
475
467
476
468
EVALUATORS_BY_MATCH_TYPE = {
477
469
ConditionMatchTypes .EXACT : exact_evaluator ,
0 commit comments