From 338ffdcaa038358762bef7f10ef91b2ea6fe680c 2021-09-22 12:47:10 From: Mithil Poojary Date: 2021-09-22 12:47:10 Subject: [PATCH] Use pathlib comparison over string comparison --- diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 7d5b897..37b3158 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -923,8 +923,7 @@ class InteractiveShell(SingletonConfigurable): paths.append(p.resolve()) # In Cygwin paths like "c:\..." and '\cygdrive\c\...' are possible - if str(p_venv).startswith("\\cygdrive"): - p_venv = Path(str(p_venv)) + if p_venv.parts[1] == "cygdrive": drive_name = p_venv.parts[2] p_venv = (drive_name + ":/") / Path(*p_venv.parts[3:])