From 6c76b9130e1ce622936f433b0299d6a9ab4425bc Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 24 Jan 2025 00:11:17 -0800 Subject: [PATCH] py3.11 compatible f-string --- reflex/utils/prerequisites.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index d6baab185..c84bffc95 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -1985,20 +1985,18 @@ def check_config_option_in_tier( config = get_config() authenticated_token = hosting.authenticated_token() - the_remedy = [] - if not authenticated_token: - the_remedy.append( + if not authenticated_token[0]: + the_remedy = ( "You are currently logged out. Run `reflex login` to access this option." ) current_tier = "anonymous" else: current_tier = authenticated_token[1].get("tier", "").lower() - the_remedy.append( - f"Your current subscription tier is `{current_tier}`. Please upgrade to {allowed_tiers} to access this option." + the_remedy = ( + f"Your current subscription tier is `{current_tier}`. " + f"Please upgrade to {allowed_tiers} to access this option." ) if current_tier not in allowed_tiers: - console.warn( - f"Config option `{option_name}` is restricted. {'\n'.join(the_remedy)}" - ) + console.warn(f"Config option `{option_name}` is restricted. {the_remedy}") setattr(config, option_name, fallback_value) config._set_persistent(**{option_name: fallback_value})