@@ -102,15 +102,15 @@ def check_apikey(apikey: str) -> str:
102102
103103def configure_server (value : str ) -> None :
104104 def check_server (server : str ) -> str :
105- is_shorthand = server in ["test" , "production " ]
105+ is_shorthand = server in ["test" , "production_server " ]
106106 if is_shorthand or looks_like_url (server ):
107107 return ""
108- return "Must be 'test', 'production ' or a url."
108+ return "Must be 'test', 'production_server ' or a url."
109109
110110 def replace_shorthand (server : str ) -> str :
111111 if server == "test" :
112- return "https://test.openml.org /api/v1/xml"
113- if server == "production " :
112+ return f" { config . TEST_SERVER_URL } /api/v1/xml"
113+ if server == "production_server " :
114114 return "https://www.openml.org/api/v1/xml"
115115 return server
116116
@@ -119,7 +119,7 @@ def replace_shorthand(server: str) -> str:
119119 value = value ,
120120 check_with_message = check_server ,
121121 intro_message = "Specify which server you wish to connect to." ,
122- input_message = "Specify a url or use 'test' or 'production ' as a shorthand: " ,
122+ input_message = "Specify a url or use 'test' or 'production_server ' as a shorthand: " ,
123123 sanitize = replace_shorthand ,
124124 )
125125
0 commit comments