@@ -59,8 +59,8 @@ 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 "
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__ )} ' ."
6464 )
6565 raise TypeError (error_message )
6666
@@ -70,8 +70,8 @@ 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 "
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__ )} ' ."
7575 )
7676 raise TypeError (error_message )
7777 return
@@ -82,8 +82,8 @@ 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 "
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__ )} ' ."
8787 )
8888
8989 raise TypeError (error_message )
@@ -141,7 +141,7 @@ def validate_input(
141141 if value_to_check not in allowed_values :
142142 raise ValueError (
143143 f"Invalid value: '{ input_value } '. "
144- f"Must be one of { expected_values } ."
144+ f"Must be one of ' { expected_values } ' ."
145145 )
146146
147147 return
0 commit comments