@@ -44,8 +44,8 @@ def get_existing_config() -> dict:
4444def configure (
4545 token : Optional [str ] = typer .Option (
4646 None ,
47- help = "Your Guardrails Hub auth token." ,
48- hide_input = True ,
47+ help = "Your Guardrails Hub auth token." ,
48+ hide_input = True ,
4949 prompt = "Token (optional) [None]" ,
5050 ),
5151 no_metrics : Optional [str ] = typer .Option (
@@ -63,27 +63,27 @@ def configure(
6363 existing_token = existing_config .get ("token" , "" )
6464 existing_no_metrics = existing_config .get ("no_metrics" , "false" )
6565
66- if not headless :
66+ if not headless :
6767 notice_message = """
6868
6969 You can find your token at https://hub.guardrailsai.com/tokens
7070 """
7171 logger .log (level = LEVELS .get ("NOTICE" ), msg = notice_message ) # type: ignore
7272
7373 # Prompt for token if not provided
74- if not token and not headless :
74+ if not token and not headless :
7575 token = typer .prompt (
76- "> Token (optional) [None]" ,
77- default = existing_token ,
78- hide_input = True ,
79- )
76+ "> Token (optional) [None]" ,
77+ default = existing_token ,
78+ hide_input = True ,
79+ )
8080
8181 # Prompt for no_metrics if not provided and not running headless
8282 if no_metrics is None and not headless :
8383 no_metrics = typer .prompt (
8484 "> Disable anonymous metrics reporting?" ,
8585 default = existing_no_metrics ,
86- )
86+ )
8787
8888 try :
8989 # If token or no_metrics was updated, save the configuration
@@ -111,9 +111,9 @@ def configure(
111111 """
112112 logger .log (level = LEVELS .get ("SUCCESS" ), msg = success_message ) # type: ignore`
113113 elif not token :
114- print ("No token provided. Skipping authentication." )
115-
116- if not headless and not token_was_updated :
114+ print ("No token provided. Skipping authentication." )
115+
116+ if not headless and not token_was_updated :
117117 print ("Existing token found. Skipping re-authentication." )
118118 except AuthenticationError as auth_error :
119119 logger .error (auth_error )
0 commit comments