From 0788d227f9c802e3cb568ea94495ca1d213df666 Mon Sep 17 00:00:00 2001 From: Pijush Chakraborty Date: Tue, 7 Jan 2025 12:01:05 +0530 Subject: [PATCH] Updating comments and vars for readability --- firebase_admin/remote_config.py | 10 +++++----- tests/test_remote_config.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firebase_admin/remote_config.py b/firebase_admin/remote_config.py index 331457b7..119f41e3 100644 --- a/firebase_admin/remote_config.py +++ b/firebase_admin/remote_config.py @@ -587,20 +587,20 @@ def _compare_semantic_versions(self, target_value, actual_value, predicate_fn) - return self._compare_versions(str(actual_value), str(target_value), predicate_fn) - def _compare_versions(self, version1, version2, predicate_fn) -> bool: + def _compare_versions(self, sem_version_1, sem_version_2, predicate_fn) -> bool: """Compares two semantic version strings. Args: - version1: The first semantic version string. - version2: The second semantic version string. + sem_version_1: The first semantic version string. + sem_version_2: The second semantic version string. predicate_fn: A function that takes an integer and returns a boolean. Returns: bool: The result of the predicate function. """ try: - v1_parts = [int(part) for part in version1.split('.')] - v2_parts = [int(part) for part in version2.split('.')] + v1_parts = [int(part) for part in sem_version_1.split('.')] + v2_parts = [int(part) for part in sem_version_2.split('.')] max_length = max(len(v1_parts), len(v2_parts)) v1_parts.extend([0] * (max_length - len(v1_parts))) v2_parts.extend([0] * (max_length - len(v2_parts))) diff --git a/tests/test_remote_config.py b/tests/test_remote_config.py index 35a38b86..2eabe15e 100644 --- a/tests/test_remote_config.py +++ b/tests/test_remote_config.py @@ -821,7 +821,7 @@ def test_evaluate_custom_signal_semantic_version(self, class MockAdapter(testutils.MockAdapter): - """A Mock HTTP Adapter that Firebase Remote Config with ETag in header.""" + """A Mock HTTP Adapter that provides Firebase Remote Config responses with ETag in header.""" ETAG = 'etag'