You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix typos and wrong types in remote_config.py #957
This is a bug in the code of this repository (firebase_admin/remote_config.py).
[REQUIRED] Step 2: Describe your environment
Operating System version: Windows 11
Firebase SDK version: 6.x (latest)
Firebase Product: remote_config
Python version: 3.11
Pip version: 24.x
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
In firebase_admin/remote_config.py, the method evaluate_custom_signal_condition
uses {} (empty dict) as the default fallback for string and list fields:
custom_signal_operator = custom_signal_condition.get('customSignalOperator') or {}
custom_signal_key = custom_signal_condition.get('customSignalKey') or {}
target_custom_signal_values = custom_signal_condition.get('targetCustomSignalValues') or {}
These should be '' (string) and [] (list) respectively, as the fields are
not dicts. Using {} is semantically incorrect.
Also, _Value.as_int() has a wrong return type annotation -> float instead
of -> int.
Relevant Code:
# Wrong defaults — should be '' and []custom_signal_operator=custom_signal_condition.get('customSignalOperator') or {}
custom_signal_key=custom_signal_condition.get('customSignalKey') or {}
target_custom_signal_values=custom_signal_condition.get('targetCustomSignalValues') or {}
# Wrong return type annotation — should be -> intdefas_int(self) ->float:
"""Returns the value as a number."""
Hey @hiranya911 , I would love to take this issue! I'm doing an open source capstone course I'm working on, and this looks ideal for a beginner like me. Please let me know if that works :)
Activity
Ackberry commentedon Jul 1, 2026
Hey @hiranya911 , I would love to take this issue! I'm doing an open source capstone course I'm working on, and this looks ideal for a beginner like me. Please let me know if that works :)