mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
pyright_test.py: Support for npx 8 and pyright PyPI package (#8769)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -27,7 +28,9 @@ def main() -> None:
|
||||
print("error running npx; is Node.js installed?", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
command = [npx, "-p", f"pyright@{_PYRIGHT_VERSION}", "pyright"] + sys.argv[1:]
|
||||
os.environ["PYRIGHT_PYTHON_FORCE_VERSION"] = _PYRIGHT_VERSION
|
||||
command = [npx, f"pyright@{_PYRIGHT_VERSION}"] + sys.argv[1:]
|
||||
print("Running:", " ".join(command))
|
||||
|
||||
ret = subprocess.run(command).returncode
|
||||
sys.exit(ret)
|
||||
|
||||
Reference in New Issue
Block a user