From 9db7df4fdca7522fc9cb51cdf70e4a8e454336d2 Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Wed, 13 Nov 2024 11:44:27 -0500 Subject: [PATCH] allow disabling; fail quietly. --- R/zzz.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/zzz.R b/R/zzz.R index ff70ab84c..593cf90bb 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -65,8 +65,12 @@ setHook("reticulate.onPyInit", function() { + disable <- nzchar(Sys.getenv("_RETICULATE_POSITRON_DISABLE_VARIABLE_INSPECTORS_")) + if (disable) + return() + # options("ark.testing" = TRUE) - inspectors <- import_positron_ipykernel_inspectors() + inspectors <- tryCatch(import_positron_ipykernel_inspectors(), error = function(e) NULL) if(is.null(inspectors)) { # warning("positron_ipykernel.inspectors could not be found, variables pane support for Python objects will be limited") return()