Skip to content

Commit 0a6a380

Browse files
authored
Merge a8380fd into d1547ab
2 parents d1547ab + a8380fd commit 0a6a380

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

.pre-commit-config.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
exclude: ^user_docs/(?!en/).*$
2+
13
repos:
24

35
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -7,8 +9,10 @@ repos:
79
- id: check-ast
810
- id: check-case-conflict
911
- id: check-merge-conflict
10-
- id: end-of-file-fixer
1112
- id: trailing-whitespace
13+
types_or: [python, c, c++, batch, markdown]
14+
- id: end-of-file-fixer
15+
types_or: [python, c, c++, batch, markdown]
1216

1317
- repo: https://github.com/asottile/add-trailing-comma
1418
rev: v3.1.0
@@ -20,7 +24,7 @@ repos:
2024

2125
- repo: https://github.com/astral-sh/ruff-pre-commit
2226
# Matches Ruff version in requirements.
23-
rev: v0.5.0
27+
rev: v0.5.2
2428
hooks:
2529
- id: ruff
2630
name: lint with ruff
@@ -30,18 +34,24 @@ repos:
3034

3135
- repo: local
3236
hooks:
37+
- id: scons-source
38+
name: running build system
39+
entry: cmd.exe /c "scons source -j 0"
40+
language: system
41+
pass_filenames: false
42+
types_or: [c, c++]
3343
- id: checkPot
3444
name: translation string check
35-
entry: cmd.exe /c "scons checkPot -j 4"
45+
entry: cmd.exe /c "scons checkPot -j 0"
3646
language: system
3747
pass_filenames: false
38-
types: [python, pofile]
48+
types: [python]
3949
- id: unitTest
4050
name: unit tests
4151
entry: ./rununittests.bat
4252
language: script
4353
pass_filenames: false
44-
types: [python, c, c++, batch]
54+
types_or: [python, c, c++, batch]
4555
- id: licenseCheck
4656
name: Check license compatibility of pip dependencies
4757
files: requirements.txt

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ sphinx==7.2.6
3838
sphinx_rtd_theme==1.3.0
3939

4040
# Requirements for automated linting
41-
ruff==0.4.10
41+
ruff==0.5.2
4242
pre-commit==3.7.1
4343

4444
# Runing automated license checks

sconstruct

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,15 @@ env.Decider("MD5-timestamp")
162162
# Warn to run the build on multiple threads so it runs faster
163163
numJobs = env.GetOption("num_jobs")
164164
numCores = multiprocessing.cpu_count()
165+
if numJobs == 0:
166+
numJobs = numCores
167+
env.SetOption('num_jobs', numJobs)
165168
if numJobs < numCores:
166169
print(
167170
f"Warning: Building with {numJobs} concurrent job{'s' if numJobs != 1 else ''} "
168171
f"while {numCores} CPU threads are available. "
169-
f"Running SCONS with the parameter '-j{numCores}' may lead to a faster build."
172+
f"Running SCONS with the parameter '-j{numCores}' may lead to a faster build. "
173+
"Running SCONS with parameter '-j0' will automatically pick all available cores."
170174
)
171175
else:
172176
print(f"Building with {numJobs} concurrent jobs")

user_docs/en/changes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Please refer to [the developer guide](https://www.nvaccess.org/files/nvda/docume
2727

2828
* Added a `.editorconfig` file to NVDA's repository in order for several IDEs to pick up basic NVDA code style rules by default. (#16795, @LeonarddeR)
2929
* It is now possible to redirect objects retrieved from on-screen coordinates, by using the `NVDAObject.objectFromPointRedirect` method. (#16788, @Emil-18)
30+
* Running SCons with the parameter `-j0` will automatically pick the maximum number of available CPU cores. (#16868, @LeonarddeR)
31+
* Updated Ruff to version 0.5.2. (#16868, @LeonarddeR)
3032

3133
#### Deprecations
3234

0 commit comments

Comments
 (0)