Skip to content

Commit 6ca80d3

Browse files
authored
pyright_test.py: Support for npx 8 and pyright PyPI package (#8769)
1 parent 1a2914a commit 6ca80d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/pyright_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22

3+
import os
34
import shutil
45
import subprocess
56
import sys
@@ -27,7 +28,9 @@ def main() -> None:
2728
print("error running npx; is Node.js installed?", file=sys.stderr)
2829
sys.exit(1)
2930

30-
command = [npx, "-p", f"pyright@{_PYRIGHT_VERSION}", "pyright"] + sys.argv[1:]
31+
os.environ["PYRIGHT_PYTHON_FORCE_VERSION"] = _PYRIGHT_VERSION
32+
command = [npx, f"pyright@{_PYRIGHT_VERSION}"] + sys.argv[1:]
33+
print("Running:", " ".join(command))
3134

3235
ret = subprocess.run(command).returncode
3336
sys.exit(ret)

0 commit comments

Comments
 (0)