Skip to content

Commit e579ec6

Browse files
authored
Merge 4a74c49 into 410e42e
2 parents 410e42e + 4a74c49 commit e579ec6

File tree

6 files changed

+30
-9
lines changed

6 files changed

+30
-9
lines changed

.coderabbit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ reviews:
2626
This project uses tabs instead of spaces, do not suggest usage of spaces over tabs.
2727
Are there any 'red flags' in this code that might warrant closer investigation from a security standpoint?
2828
Explain what makes them suspicious.
29+
When providing code suggestions, particularly when requested, ensure GitHub's suggestion format is used, i.e.:
30+
```suggestion
31+
<code changes>
32+
```
2933
"
3034
- path: "**/*.py"
3135
instructions: "

.pre-commit-config.yaml

Lines changed: 17 additions & 6 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,21 +34,28 @@ repos:
3034

3135
- repo: local
3236
hooks:
37+
- id: scons-source
38+
name: build c/c++ files
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]
49+
files: ^source/.*$
3950
- id: unitTest
4051
name: unit tests
4152
entry: ./rununittests.bat
4253
language: script
4354
pass_filenames: false
44-
types: [python, c, c++, batch]
55+
types_or: [python, c, c++, batch]
4556
- id: licenseCheck
4657
name: Check license compatibility of pip dependencies
47-
files: requirements.txt
58+
files: ^(requirements\.txt|runlicensecheck\.bat)$
4859
entry: ./runlicensecheck.bat
4960
language: script
5061
pass_filenames: false

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
@@ -44,6 +44,8 @@ Please refer to [the developer guide](https://www.nvaccess.org/files/nvda/docume
4444
* Dictionary metadata can be added to an optional `symbolDictionaries` section in the add-on manifest.
4545
* Please consult the [Custom speech symbol dictionaries section in the developer guide](https://www.nvaccess.org/files/nvda/documentation/developerGuide.html#AddonSymbolDictionaries) for more details.
4646
* It is now possible to redirect objects retrieved from on-screen coordinates, by using the `NVDAObject.objectFromPointRedirect` method. (#16788, @Emil-18)
47+
* Running SCons with the parameter `-j0` will automatically pick the maximum number of available CPU cores. (#16868, @LeonarddeR)
48+
* Updated Ruff to version 0.5.2. (#16868, @LeonarddeR)
4749

4850
#### Deprecations
4951

venvUtils/ensureVenv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def ensureVenvAndRequirements():
178178
"This means that transitive dependencies can get out of sync "
179179
"with those used in automated builds. "
180180
"Would you like to continue recreating the environment?",
181-
default=True,
181+
default=False,
182182
):
183183
return createVenvAndPopulate()
184184
return populate()

0 commit comments

Comments
 (0)