Skip to content

Commit 5acb0cf

Browse files
committed
Remove check_type(optional=False) keyword parameters
This is the new default.
1 parent 50c1350 commit 5acb0cf

File tree

14 files changed

+62
-62
lines changed

14 files changed

+62
-62
lines changed

webexteamssdk/api/access_tokens.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(self, base_url, object_factory, single_request_timeout=None):
7979
TypeError: If the parameter types are incorrect.
8080
8181
"""
82-
check_type(base_url, basestring, optional=False)
82+
check_type(base_url, basestring)
8383
check_type(single_request_timeout, int, optional=True)
8484

8585
super(AccessTokensAPI, self).__init__()
@@ -125,10 +125,10 @@ def get(self, client_id, client_secret, code, redirect_uri):
125125
ApiError: If the Webex Teams cloud returns an error.
126126
127127
"""
128-
check_type(client_id, basestring, optional=False)
129-
check_type(client_secret, basestring, optional=False)
130-
check_type(code, basestring, optional=False)
131-
check_type(redirect_uri, basestring, optional=False)
128+
check_type(client_id, basestring)
129+
check_type(client_secret, basestring)
130+
check_type(code, basestring)
131+
check_type(redirect_uri, basestring)
132132

133133
post_data = dict_from_items_with_values(
134134
grant_type="authorization_code",
@@ -166,9 +166,9 @@ def refresh(self, client_id, client_secret, refresh_token):
166166
ApiError: If the Webex Teams cloud returns an error.
167167
168168
"""
169-
check_type(client_id, basestring, optional=False)
170-
check_type(client_secret, basestring, optional=False)
171-
check_type(refresh_token, basestring, optional=False)
169+
check_type(client_id, basestring)
170+
check_type(client_secret, basestring)
171+
check_type(refresh_token, basestring)
172172

173173
post_data = dict_from_items_with_values(
174174
grant_type="refresh_token",

webexteamssdk/api/attachment_actions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def __init__(self, session, object_factory):
6666
TypeError: If the parameter types are incorrect.
6767
6868
"""
69-
check_type(session, RestSession, optional=False)
69+
check_type(session, RestSession)
7070
super(AttachmentActionsAPI, self).__init__()
7171
self._session = session
7272
self._object_factory = object_factory
@@ -96,9 +96,9 @@ def create(self, type=None, messageId=None, inputs=None,
9696
9797
"""
9898

99-
check_type(type, basestring, optional=False)
100-
check_type(messageId, basestring, optional=False)
101-
check_type(inputs, dict, optional=False)
99+
check_type(type, basestring)
100+
check_type(messageId, basestring)
101+
check_type(inputs, dict)
102102

103103
post_data = dict_from_items_with_values(
104104
request_parameters,
@@ -128,7 +128,7 @@ def get(self, attachmentId):
128128
ApiError: If the Webex Teams cloud returns an error.
129129
130130
"""
131-
check_type(attachmentId, basestring, optional=False)
131+
check_type(attachmentId, basestring)
132132

133133
# API request
134134
json_data = self._session.get(API_ENDPOINT + '/' + attachmentId)

webexteamssdk/api/events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(self, session, object_factory):
6565
TypeError: If the parameter types are incorrect.
6666
6767
"""
68-
check_type(session, RestSession, optional=False)
68+
check_type(session, RestSession)
6969

7070
super(EventsAPI, self).__init__()
7171

@@ -159,7 +159,7 @@ def get(self, eventId):
159159
ApiError: If the Webex Teams cloud returns an error.
160160
161161
"""
162-
check_type(eventId, basestring, optional=False)
162+
check_type(eventId, basestring)
163163

164164
# API request
165165
json_data = self._session.get(API_ENDPOINT + '/' + eventId)

webexteamssdk/api/licenses.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(self, session, object_factory):
6565
TypeError: If the input object is not a dictionary or string.
6666
6767
"""
68-
check_type(session, RestSession, optional=False)
68+
check_type(session, RestSession)
6969

7070
super(LicensesAPI, self).__init__()
7171

@@ -122,7 +122,7 @@ def get(self, licenseId):
122122
ApiError: If the Webex Teams cloud returns an error.
123123
124124
"""
125-
check_type(licenseId, basestring, optional=False)
125+
check_type(licenseId, basestring)
126126

127127
# API request
128128
json_data = self._session.get(API_ENDPOINT + '/' + licenseId)

webexteamssdk/api/memberships.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def create(self, roomId, personId=None, personEmail=None,
159159
ApiError: If the Webex Teams cloud returns an error.
160160
161161
"""
162-
check_type(roomId, basestring, optional=False)
162+
check_type(roomId, basestring)
163163
check_type(personId, basestring, optional=True)
164164
check_type(personEmail, basestring, optional=True)
165165
check_type(isModerator, bool, optional=True)
@@ -193,7 +193,7 @@ def get(self, membershipId):
193193
ApiError: If the Webex Teams cloud returns an error.
194194
195195
"""
196-
check_type(membershipId, basestring, optional=False)
196+
check_type(membershipId, basestring)
197197

198198
# API request
199199
json_data = self._session.get(API_ENDPOINT + '/' + membershipId)
@@ -219,7 +219,7 @@ def update(self, membershipId, isModerator=None, **request_parameters):
219219
ApiError: If the Webex Teams cloud returns an error.
220220
221221
"""
222-
check_type(membershipId, basestring, optional=False)
222+
check_type(membershipId, basestring)
223223
check_type(isModerator, bool, optional=True)
224224

225225
put_data = dict_from_items_with_values(

webexteamssdk/api/messages.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def __init__(self, session, object_factory):
6666
TypeError: If the parameter types are incorrect.
6767
6868
"""
69-
check_type(session, RestSession, optional=False)
69+
check_type(session, RestSession)
7070
super(MessagesAPI, self).__init__()
7171
self._session = session
7272
self._object_factory = object_factory
@@ -112,7 +112,7 @@ def list(self, roomId, mentionedPeople=None, before=None,
112112
ApiError: If the Webex Teams cloud returns an error.
113113
114114
"""
115-
check_type(roomId, basestring, optional=False)
115+
check_type(roomId, basestring)
116116
check_type(mentionedPeople, basestring, optional=True)
117117
check_type(before, basestring, optional=True)
118118
check_type(beforeMessage, basestring, optional=True)
@@ -246,7 +246,7 @@ def get(self, messageId):
246246
ApiError: If the Webex Teams cloud returns an error.
247247
248248
"""
249-
check_type(messageId, basestring, optional=False)
249+
check_type(messageId, basestring)
250250

251251
# API request
252252
json_data = self._session.get(API_ENDPOINT + '/' + messageId)
@@ -265,7 +265,7 @@ def delete(self, messageId):
265265
ApiError: If the Webex Teams cloud returns an error.
266266
267267
"""
268-
check_type(messageId, basestring, optional=False)
268+
check_type(messageId, basestring)
269269

270270
# API request
271271
self._session.delete(API_ENDPOINT + '/' + messageId)

webexteamssdk/api/organizations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(self, session, object_factory):
6262
TypeError: If the parameter types are incorrect.
6363
6464
"""
65-
check_type(session, RestSession, optional=False)
65+
check_type(session, RestSession)
6666

6767
super(OrganizationsAPI, self).__init__()
6868

@@ -111,7 +111,7 @@ def get(self, orgId):
111111
ApiError: If the Webex Teams cloud returns an error.
112112
113113
"""
114-
check_type(orgId, basestring, optional=False)
114+
check_type(orgId, basestring)
115115

116116
# API request
117117
json_data = self._session.get(API_ENDPOINT + '/' + orgId)

webexteamssdk/api/people.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def create(self, emails, displayName=None, firstName=None, lastName=None,
161161
ApiError: If the Webex Teams cloud returns an error.
162162
163163
"""
164-
check_type(emails, list, optional=False)
164+
check_type(emails, list)
165165
check_type(displayName, basestring, optional=True)
166166
check_type(firstName, basestring, optional=True)
167167
check_type(lastName, basestring, optional=True)
@@ -202,7 +202,7 @@ def get(self, personId):
202202
ApiError: If the Webex Teams cloud returns an error.
203203
204204
"""
205-
check_type(personId, basestring, optional=False)
205+
check_type(personId, basestring)
206206

207207
# API request
208208
json_data = self._session.get(API_ENDPOINT + '/' + personId)
@@ -290,7 +290,7 @@ def delete(self, personId):
290290
ApiError: If the Webex Teams cloud returns an error.
291291
292292
"""
293-
check_type(personId, basestring, optional=False)
293+
check_type(personId, basestring)
294294

295295
# API request
296296
self._session.delete(API_ENDPOINT + '/' + personId)

webexteamssdk/api/roles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(self, session, object_factory):
6565
TypeError: If the parameter types are incorrect.
6666
6767
"""
68-
check_type(session, RestSession, optional=False)
68+
check_type(session, RestSession)
6969

7070
super(RolesAPI, self).__init__()
7171

@@ -113,7 +113,7 @@ def get(self, roleId):
113113
ApiError: If the Webex Teams cloud returns an error.
114114
115115
"""
116-
check_type(roleId, basestring, optional=False)
116+
check_type(roleId, basestring)
117117

118118
# API request
119119
json_data = self._session.get(API_ENDPOINT + '/' + roleId)

webexteamssdk/api/rooms.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(self, session, object_factory):
6565
TypeError: If the parameter types are incorrect.
6666
6767
"""
68-
check_type(session, RestSession, optional=False)
68+
check_type(session, RestSession)
6969

7070
super(RoomsAPI, self).__init__()
7171

@@ -181,7 +181,7 @@ def get(self, roomId):
181181
ApiError: If the Webex Teams cloud returns an error.
182182
183183
"""
184-
check_type(roomId, basestring, optional=False)
184+
check_type(roomId, basestring)
185185

186186
# API request
187187
json_data = self._session.get(API_ENDPOINT + '/' + roomId)
@@ -206,7 +206,7 @@ def update(self, roomId, title=None, **request_parameters):
206206
ApiError: If the Webex Teams cloud returns an error.
207207
208208
"""
209-
check_type(roomId, basestring, optional=False)
209+
check_type(roomId, basestring)
210210
check_type(roomId, basestring, optional=True)
211211

212212
put_data = dict_from_items_with_values(
@@ -232,7 +232,7 @@ def delete(self, roomId):
232232
ApiError: If the Webex Teams cloud returns an error.
233233
234234
"""
235-
check_type(roomId, basestring, optional=False)
235+
check_type(roomId, basestring)
236236

237237
# API request
238238
self._session.delete(API_ENDPOINT + '/' + roomId)

0 commit comments

Comments
 (0)