Only observer return types when type tracing is enabled.
@@ -390,6 +390,7 @@ def _run() -> ReturnCode:
if (setup_result := _setup_and_check()) is None:
return ReturnCode.SETUP_FAILED
executor, test_cluster, constant_provider = setup_result
+ if config.configuration.type_inference.type_tracing:
# Observe return types during execution.
executor.add_observer(ReturnTypeObserver(test_cluster))
