@@ -29,9 +29,10 @@ def check_keys(valid_keys: list, input_keys: list, parameters: str):
29
29
String describing the type of parameters
30
30
that are being tested.
31
31
32
- Returns
33
- -------
34
- raises ValueError if input_keys are not valid
32
+ Raises
33
+ ------
34
+ ValueError
35
+ if input_keys are not valid
35
36
"""
36
37
if not all (key in valid_keys for key in input_keys ):
37
38
raise ValueError (
@@ -55,10 +56,12 @@ def check_required_key(
55
56
String describing the type of parameters
56
57
that are being tested.
57
58
58
- Returns
59
- -------
60
- raises ValueError if required_key is not present.
61
- raises TypeError if required_key is neither a list or a string.
59
+ Raises
60
+ ------
61
+ ValueError
62
+ if required_key is not present.
63
+ TypeError
64
+ if required_key is neither a list or a string.
62
65
"""
63
66
if isinstance (required_key , str ):
64
67
if required_key not in input_keys :
@@ -93,7 +96,7 @@ def list_sessions(cls, query_params: dict = None, server: str = None):
93
96
Returns a collection of sessions available on the CAS server.
94
97
95
98
Parameters
96
- ------
99
+ ----------
97
100
query_params : dict, optional
98
101
Query parameters.
99
102
Valid keys are `start`, `limit`, `filter`,
@@ -129,7 +132,7 @@ def create_session(cls, properties: dict, server: str = None):
129
132
"""Creates a new session on the CAS server.
130
133
131
134
Parameters
132
- ------
135
+ ----------
133
136
properties : dict
134
137
Properties of the session.
135
138
Valid keys are `authenticationType` (required),
@@ -164,7 +167,7 @@ def delete_session(
164
167
"""Terminates a session on the CAS server.
165
168
166
169
Parameters
167
- ------
170
+ ----------
168
171
sess_id : str
169
172
A string indicating the Session id.
170
173
server : str
@@ -225,7 +228,7 @@ def get_caslib(cls, name: str, server: str = None):
225
228
226
229
Returns
227
230
-------
228
- RestObj
231
+ RestObj or None
229
232
230
233
"""
231
234
server = server or DEFAULT_SERVER
@@ -278,7 +281,7 @@ def get_table(cls, name: str, caslib: Union[str, dict] = None, server: str = Non
278
281
279
282
Returns
280
283
-------
281
- RestObj
284
+ RestObj or None
282
285
283
286
"""
284
287
caslib = caslib or DEFAULT_CASLIB
@@ -309,7 +312,7 @@ def upload_file(
309
312
310
313
Parameters
311
314
----------
312
- file : str or file-like object
315
+ file : str or typing.TextIO
313
316
File containing data to upload or path to the file.
314
317
name : str
315
318
Name of the table to create
@@ -321,7 +324,8 @@ def upload_file(
321
324
header : bool, optional
322
325
Whether the first row of data contains column headers. Defaults to
323
326
True.
324
- format_ : {"csv", "xls", "xlsx", "sas7bdat", "sashdat"}, optional
327
+ format_ : str, optional
328
+ Choose from {"csv", "xls", "xlsx", "sas7bdat", "sashdat"}.
325
329
File of input `file`. Not required if format can be discerned from
326
330
the file path.
327
331
detail : dict, optional
@@ -637,6 +641,11 @@ def del_table(
637
641
Returns
638
642
-------
639
643
RestObj
644
+
645
+ Raises
646
+ ------
647
+ ValueError
648
+ If `query_params` is empty
640
649
"""
641
650
642
651
server = server or DEFAULT_SERVER
0 commit comments