Skip to content

Commit

Permalink
fix pyright errors in python code
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Jan 15, 2024
1 parent 7a2903a commit 1d8a183
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion basedpyright/run_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@


def run(script_name: str):
node.run([Path(__file__).parent / f"{script_name}.js", *sys.argv[1:]])
_ = node.run([Path(__file__).parent / f"{script_name}.js", *sys.argv[1:]])
14 changes: 11 additions & 3 deletions pdm_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@
from json import loads
from pathlib import Path
from shutil import copyfile, copytree
from typing import TYPE_CHECKING

from nodejs import npm
# https://github.com/samwillis/nodejs-pypi/pull/23
if TYPE_CHECKING:
# https://github.com/astral-sh/ruff/issues/9528
from subprocess import run as run_ # noqa: S404

run = run_
else:
from nodejs.npm import run

if not Path("node_modules").exists():
_ = npm.run(["ci"], check=True)
_ = npm.run(["run", "build:cli:dev"], check=True)
_ = run(["ci"], check=True)
_ = run(["run", "build:cli:dev"], check=True)

npm_package_dir = Path("packages/pyright")
pypi_package_dir = Path("basedpyright")
Expand Down

0 comments on commit 1d8a183

Please sign in to comment.