@@ -59,8 +59,8 @@ def check_type(
59
59
"We were expecting to receive a list of objects of the "
60
60
"following types: "
61
61
f"{ ', ' .join ([repr (t .__name__ ) for t in acceptable_types ])} "
62
- f"{ ' or \' None\' ' if optional else '' } ; instead we received "
63
- f"{ obj } which is a { repr (type (obj ).__name__ )} ."
62
+ f"{ ' or None' if optional else '' } ; instead we received "
63
+ f"' { obj } ' which is a ' { repr (type (obj ).__name__ )} ' ."
64
64
)
65
65
raise TypeError (error_message )
66
66
@@ -70,8 +70,8 @@ def check_type(
70
70
"We were expecting to receive an object of one of the "
71
71
"following types: "
72
72
f"{ ', ' .join (repr (t .__name__ ) for t in acceptable_types )} "
73
- f"{ ' or \' None\' ' if optional else '' } ; instead we "
74
- f"received { o } which is a { repr (type (o ).__name__ )} ."
73
+ f"{ ' or None' if optional else '' } ; instead we "
74
+ f"received ' { o } ' which is a ' { repr (type (o ).__name__ )} ' ."
75
75
)
76
76
raise TypeError (error_message )
77
77
return
@@ -82,8 +82,8 @@ def check_type(
82
82
error_message = (
83
83
"We were expecting to receive an instance of one of the following "
84
84
f"types: { ', ' .join (repr (t .__name__ ) for t in acceptable_types )} "
85
- f"{ ' or \' None\' ' if optional else '' } ; but instead we received "
86
- f"{ obj } which is a { repr (type (obj ).__name__ )} ."
85
+ f"{ ' or None' if optional else '' } ; but instead we received "
86
+ f"' { obj } ' which is a ' { repr (type (obj ).__name__ )} ' ."
87
87
)
88
88
89
89
raise TypeError (error_message )
@@ -141,7 +141,7 @@ def validate_input(
141
141
if value_to_check not in allowed_values :
142
142
raise ValueError (
143
143
f"Invalid value: '{ input_value } '. "
144
- f"Must be one of { expected_values } ."
144
+ f"Must be one of ' { expected_values } ' ."
145
145
)
146
146
147
147
return
0 commit comments