Skip to content

Commit

Permalink
Improve colab notebook detection
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
hoxbro committed Jul 4, 2023
1 parent 205487d commit e2767bb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions panel/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,12 +787,9 @@ def _detect_comms(self, params):
return

# Try to detect environment so that we can enable comms
try:
import google.colab # noqa
if "google.colab" in sys.modules:
config.comms = "colab"
return
except ImportError:
pass

if "VSCODE_CWD" in os.environ or "VSCODE_PID" in os.environ:
config.comms = "vscode"
Expand Down

0 comments on commit e2767bb

Please sign in to comment.