Skip to content

Commit 33eebb7

Browse files
Update remote_config.py
Fixed typos in comments and added additional description
1 parent 6e37b99 commit 33eebb7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

firebase_admin/remote_config.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def template_data_json(self):
124124

125125

126126
class ServerTemplate:
127-
"""Represents a Server Template with implementations for loading and evaluting the template."""
127+
"""Represents a Server Template with implementations for loading and evaluating the template."""
128128
def __init__(self, app: App = None, default_config: Optional[Dict[str, str]] = None):
129129
"""Initializes a ServerTemplate instance.
130130
@@ -293,7 +293,7 @@ def __init__(self, conditions, parameters, context, config_values):
293293
self._config_values = config_values
294294

295295
def evaluate(self):
296-
"""Internal function Evaluates the cached server template to produce
296+
"""Internal function that evaluates the cached server template to produce
297297
a ServerConfig"""
298298
evaluated_conditions = self.evaluate_conditions(self._conditions, self._context)
299299

@@ -338,7 +338,7 @@ def evaluate_conditions(self, conditions, context)-> Dict[str, bool]:
338338
context: An EvaluationContext object.
339339
340340
Returns:
341-
A dictionary mapping condition names to boolean evaluation results.
341+
A dictionary that maps condition names to boolean evaluation results.
342342
"""
343343
evaluated_conditions = {}
344344
for condition in conditions:
@@ -410,7 +410,7 @@ def evaluate_and_condition(self, and_condition,
410410
nesting_level: The current recursion depth.
411411
412412
Returns:
413-
True if all of the subconditions are true, False otherwise.
413+
True if all of the subconditions are met; False otherwise.
414414
"""
415415
sub_conditions = and_condition.get('conditions') or []
416416
for sub_condition in sub_conditions:
@@ -627,7 +627,7 @@ def _compare_semantic_versions(self, custom_signal_key,
627627
or greater than target.
628628
629629
Args:
630-
custom_signal_key: The custom singal for which the evaluation is being performed.
630+
custom_signal_key: The custom signal for which the evaluation is being performed.
631631
target_values: A list of target string values.
632632
actual_value: The actual value to compare, which can be a string or number.
633633
predicate_fn: A function that takes an integer (-1, 0, or 1) and returns a boolean.
@@ -721,6 +721,9 @@ def __init__(self, source: ValueSource, value: str = DEFAULT_VALUE_FOR_STRING):
721721
722722
Args:
723723
source: The source of the value (e.g., 'default', 'remote', 'static').
724+
"static" indicates the value was defined by a static constant.
725+
"default" indicates the value was defined by default config.
726+
"remote" indicates the value was defined by config produced by evaluating a template.
724727
value: The string value.
725728
"""
726729
self.source = source

0 commit comments

Comments
 (0)