Skip to content

Commit f0e16b8

Browse files
authored
Add --threads argument to pyright cli (#12688)
1 parent bb98177 commit f0e16b8

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/workflows/meta_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
version: PATH
6262
python-platform: ${{ matrix.python-platform }}
6363
python-version: "3.9" # Oldest version supported for running scripts and tests
64+
extra-args: --threads
6465
project: ./pyrightconfig.scripts_and_tests.json
6566
stubsabot-dry-run:
6667
name: Stubsabot dry run

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,15 @@ jobs:
145145
version: PATH
146146
python-platform: ${{ matrix.python-platform }}
147147
python-version: ${{ matrix.python-version }}
148+
extra-args: --threads
148149
annotate: ${{ matrix.python-version == '3.12' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
149150
- name: Run pyright with stricter settings on some of the stubs
150151
uses: jakebailey/pyright-action@v2
151152
with:
152153
version: PATH
153154
python-platform: ${{ matrix.python-platform }}
154155
python-version: ${{ matrix.python-version }}
156+
extra-args: --threads
155157
annotate: ${{ matrix.python-version == '3.12' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
156158
project: ./pyrightconfig.stricter.json
157159
- name: Run pyright on the test cases
@@ -160,6 +162,7 @@ jobs:
160162
version: PATH
161163
python-platform: ${{ matrix.python-platform }}
162164
python-version: ${{ matrix.python-version }}
165+
extra-args: --threads
163166
annotate: ${{ matrix.python-version == '3.12' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
164167
project: ./pyrightconfig.testcases.json
165168

tests/pyright_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def main() -> None:
3737
# version installed into the virtual environment, due to failures on some
3838
# platforms. https://github.com/python/typeshed/issues/11614
3939
os.environ["PYRIGHT_PYTHON_FORCE_VERSION"] = pyright_version
40-
command = [npx, f"pyright@{pyright_version}"] + sys.argv[1:]
40+
command = [npx, f"pyright@{pyright_version}"] + sys.argv[1:] + ["--threads"]
4141
print_command(command)
4242

4343
ret = subprocess.run(command).returncode

0 commit comments

Comments
 (0)