Commit 21169087 by Brian Marroquin Committed by GitHub

fixes mypy issue on windows (#5135)

* fixes mypy issue on windows

* adds comments for mypy fix
parent b99b455d
...@@ -72,7 +72,9 @@ class Shell: ...@@ -72,7 +72,9 @@ class Shell:
bin_dir = "Scripts" if WINDOWS else "bin" bin_dir = "Scripts" if WINDOWS else "bin"
activate_path = env.path / bin_dir / activate_script activate_path = env.path / bin_dir / activate_script
if WINDOWS: # mypy requires using sys.platform instead of WINDOWS constant
# in if statements to properly type check on Windows
if sys.platform == "win32":
if self._name in ("powershell", "pwsh"): if self._name in ("powershell", "pwsh"):
args = ["-NoExit", "-File", str(activate_path)] args = ["-NoExit", "-File", str(activate_path)]
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment