Skip to content

Commit 3148e5a

Browse files
author
Sakthivel Ramasamy (sakthram)
committed
Correct minor non-service impacting cosmetic issues
1 parent 9d25de7 commit 3148e5a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/webexpythonsdk/models/cards/utils.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def check_type(
5959
"We were expecting to receive a list of objects of the "
6060
"following types: "
6161
f"{", ".join([repr(t.__name__) for t in acceptable_types])}"
62-
f"{" or \"None\"" if optional else ""}; instead we received "
62+
f"{" or 'None'" if optional else ""}; instead we received "
6363
f"{obj} which is a {repr(type(obj).__name__)}."
6464
)
6565
raise TypeError(error_message)
@@ -70,7 +70,7 @@ def check_type(
7070
"We were expecting to receive an object of one of the "
7171
"following types: "
7272
f"{", ".join(repr(t.__name__) for t in acceptable_types)}"
73-
f"{" or \"None\"" if optional else ""}; instead we "
73+
f"{" or 'None'" if optional else ""}; instead we "
7474
f"received {o} which is a {repr(type(o).__name__)}."
7575
)
7676
raise TypeError(error_message)
@@ -82,7 +82,7 @@ def check_type(
8282
error_message = (
8383
"We were expecting to receive an instance of one of the following "
8484
f"types: {", ".join(repr(t.__name__) for t in acceptable_types)}"
85-
f"{" or \"None\"" if optional else ""}; but instead we received "
85+
f"{" or 'None'" if optional else ""}; but instead we received "
8686
f"{obj} which is a {repr(type(obj).__name__)}."
8787
)
8888

@@ -140,7 +140,8 @@ def validate_input(
140140
# Check if the value is in the tuple of allowed values
141141
if value_to_check not in allowed_values:
142142
raise ValueError(
143-
f"Invalid value: {input_value}. Must be one of {expected_values}."
143+
f"Invalid value: \"{input_value}\". "
144+
f"Must be one of {expected_values}."
144145
)
145146

146147
return
@@ -178,13 +179,13 @@ def validate_dict_str(
178179
for key, value in input_value.items():
179180
if not isinstance(key, key_type):
180181
errors.append(
181-
f"Key \"{key}\" of type {type(key).__name__} "
182-
f"is not of type {key_type.__name__}."
182+
f"Key \"{key}\" of type \"{type(key).__name__}\" "
183+
f"is not of type \"{key_type.__name__}\"."
183184
)
184185
if not isinstance(value, value_type):
185186
errors.append(
186-
f"Value \"{value}\" of type {type(value).__name__} "
187-
f"is not of type {value_type.__name__}."
187+
f"Value \"{value}\" of type \"{type(value).__name__}\" "
188+
f"is not of type \"{value_type.__name__}\"."
188189
)
189190

190191
if errors:

0 commit comments

Comments
 (0)