@@ -259,15 +259,15 @@ def __init__(
259259 self .api_key = None
260260 self .bootstrap_jwt = None
261261
262- def token_endpoint (self ):
262+ def token_endpoint (self ) -> str :
263263 params = get_connection_parameters (self .snowflake_connection_name )
264264
265265 if params is None :
266266 raise RSConnectException ("No Snowflake connection found." )
267267
268268 return "https://{}.snowflakecomputing.com/" .format (params ["account" ])
269269
270- def fmt_payload (self ):
270+ def fmt_payload (self ) -> str :
271271 params = get_connection_parameters (self .snowflake_connection_name )
272272
273273 if params is None :
@@ -282,7 +282,7 @@ def fmt_payload(self):
282282 payload = urlencode (payload )
283283 return payload
284284
285- def exchange_token (self ):
285+ def exchange_token (self ) -> str | bytes :
286286 try :
287287 server = HTTPServer (url = self .token_endpoint ())
288288 payload = self .fmt_payload ()
@@ -1880,7 +1880,7 @@ def verify_api_key(connect_server: RSConnectServer) -> str:
18801880 return result ["username" ]
18811881
18821882
1883- def get_python_info (connect_server : RSConnectServer ):
1883+ def get_python_info (connect_server : PositConnectServer ):
18841884 """
18851885 Return information about versions of Python that are installed on the indicated
18861886 Connect server.
@@ -1894,7 +1894,7 @@ def get_python_info(connect_server: RSConnectServer):
18941894 return result
18951895
18961896
1897- def get_app_info (connect_server : RSConnectServer , app_id : str ):
1897+ def get_app_info (connect_server : PositConnectServer , app_id : str ):
18981898 """
18991899 Return information about an application that has been created in Connect.
19001900
@@ -1915,7 +1915,7 @@ def get_posit_app_info(server: PositServer, app_id: str):
19151915 return response ["source" ]
19161916
19171917
1918- def get_app_config (connect_server : RSConnectServer , app_id : str ):
1918+ def get_app_config (connect_server : PositConnectServer , app_id : str ):
19191919 """
19201920 Return the configuration information for an application that has been created
19211921 in Connect.
@@ -1931,7 +1931,7 @@ def get_app_config(connect_server: RSConnectServer, app_id: str):
19311931
19321932
19331933def emit_task_log (
1934- connect_server : RSConnectServer ,
1934+ connect_server : PositConnectServer ,
19351935 app_id : str ,
19361936 task_id : str ,
19371937 log_callback : Optional [Callable [[str ], None ]],
@@ -1967,7 +1967,7 @@ def emit_task_log(
19671967
19681968
19691969def retrieve_matching_apps (
1970- connect_server : RSConnectServer ,
1970+ connect_server : PositConnectServer ,
19711971 filters : Optional [dict [str , str | int ]] = None ,
19721972 limit : Optional [int ] = None ,
19731973 mapping_function : Optional [Callable [[RSConnectClient , ContentItemV0 ], AbbreviatedAppItem | None ]] = None ,
@@ -2043,7 +2043,7 @@ class AbbreviatedAppItem(TypedDict):
20432043 config_url : str
20442044
20452045
2046- def override_title_search (connect_server : RSConnectServer , app_id : str , app_title : str ):
2046+ def override_title_search (connect_server : PositConnectServer , app_id : str , app_title : str ):
20472047 """
20482048 Returns a list of abbreviated app data that contains apps with a title
20492049 that matches the given one and/or the specific app noted by its ID.
@@ -2124,7 +2124,7 @@ def find_unique_name(remote_server: TargetableServer, name: str):
21242124 :param name: the default name for an app.
21252125 :return: the name, potentially with a suffixed number to guarantee uniqueness.
21262126 """
2127- if isinstance (remote_server , RSConnectServer ):
2127+ if isinstance (remote_server , PositConnectServer ):
21282128 existing_names = retrieve_matching_apps (
21292129 remote_server ,
21302130 filters = {"search" : name },
0 commit comments