@@ -184,7 +184,7 @@ def get_context(cls, error_if_none=True) -> Optional[T]:
184
184
# Calling code expects to get a TypeError if the entity
185
185
# is unfound, and there's too much to fix.
186
186
if error_if_none :
187
- raise TypeError (f"No { str ( cls ) } on context stack" )
187
+ raise TypeError (f"No { cls } on context stack" )
188
188
return None
189
189
return candidate
190
190
@@ -200,9 +200,9 @@ def get_contexts(cls) -> List[T]:
200
200
# no race-condition here, contexts is a thread-local object
201
201
# be sure not to override contexts in a subclass however!
202
202
context_class = cls .context_class
203
- assert isinstance (context_class , type ), (
204
- f"Name of context class, { context_class } was not resolvable to a class"
205
- )
203
+ assert isinstance (
204
+ context_class , type
205
+ ), f"Name of context class, { context_class } was not resolvable to a class"
206
206
if not hasattr (context_class , "contexts" ):
207
207
context_class .contexts = threading .local ()
208
208
@@ -1589,7 +1589,7 @@ def check_start_vals(self, start):
1589
1589
raise SamplingError (
1590
1590
"Initial evaluation of model at starting point failed!\n "
1591
1591
f"Starting values:\n { elem } \n \n "
1592
- f"Initial evaluation results:\n { str ( initial_eval ) } "
1592
+ f"Initial evaluation results:\n { initial_eval } "
1593
1593
)
1594
1594
1595
1595
def check_test_point (self , * args , ** kwargs ):
0 commit comments