@@ -616,15 +616,18 @@ def _compare_numbers(self, custom_signal_key, target_value, actual_value, predic
616616 result = - 1 if actual < target else 1 if actual > target else 0
617617 return predicate_fn (result )
618618 except ValueError :
619- logger .warning ("Invalid numeric value for comparison for custom signal key %s." , custom_signal_key )
619+ logger .warning ("Invalid numeric value for comparison for custom signal key %s." ,
620+ custom_signal_key )
620621 return False
621622
622- def _compare_semantic_versions (self , custom_signal_key , target_value , actual_value , predicate_fn ) -> bool :
623+ def _compare_semantic_versions (self , custom_signal_key ,
624+ target_value , actual_value , predicate_fn ) -> bool :
623625 """Compares the actual semantic version value of a signal against a target value.
624626 Calls the predicate function with -1, 0, 1 if actual is less than, equal to,
625627 or greater than target.
626628
627629 Args:
630+ custom_signal_key: The custom singal for which the evaluation is being performed.
628631 target_values: A list of target string values.
629632 actual_value: The actual value to compare, which can be a string or number.
630633 predicate_fn: A function that takes an integer (-1, 0, or 1) and returns a boolean.
@@ -636,10 +639,12 @@ def _compare_semantic_versions(self, custom_signal_key, target_value, actual_val
636639 return self ._compare_versions (custom_signal_key , str (actual_value ),
637640 str (target_value ), predicate_fn )
638641
639- def _compare_versions (self , custom_signal_key , sem_version_1 , sem_version_2 , predicate_fn ) -> bool :
642+ def _compare_versions (self , custom_signal_key ,
643+ sem_version_1 , sem_version_2 , predicate_fn ) -> bool :
640644 """Compares two semantic version strings.
641645
642646 Args:
647+ custom_signal_key: The custom singal for which the evaluation is being performed.
643648 sem_version_1: The first semantic version string.
644649 sem_version_2: The second semantic version string.
645650 predicate_fn: A function that takes an integer and returns a boolean.
@@ -663,7 +668,9 @@ def _compare_versions(self, custom_signal_key, sem_version_1, sem_version_2, pre
663668 return predicate_fn (1 )
664669 return predicate_fn (0 )
665670 except ValueError :
666- logger .warning ("Invalid semantic version format for comparison for custom signal key %s." , custom_signal_key )
671+ logger .warning (
672+ "Invalid semantic version format for comparison for custom signal key %s." ,
673+ custom_signal_key )
667674 return False
668675
669676async def get_server_template (app : App = None , default_config : Optional [Dict [str , str ]] = None ):
0 commit comments