1313 autoupdate_schedule : monthly
1414 autoupdate_commit_msg : " Pre-commit auto-update"
1515 autofix_commit_msg : " Pre-commit auto-fix"
16+ submodules : true
1617
1718default_language_version :
1819 python : python3.11
@@ -52,14 +53,14 @@ repos:
5253 - id : debug-statements
5354 # Removes trailing whitespace.
5455 - id : trailing-whitespace
55- types_or : [python, c, c++, batch, markdown]
56+ types_or : [python, c, c++, batch, markdown, toml, yaml ]
5657 # Ensures all files end in 1 (and only 1) newline.
5758 - id : end-of-file-fixer
58- types_or : [python, c, c++, batch, markdown]
59+ types_or : [python, c, c++, batch, markdown, toml, yaml ]
5960 # Removes the UTF-8 BOM from files that have it.
6061 # See https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/codingStandards.md#encoding
6162 - id : fix-byte-order-marker
62- types_or : [python, c, c++, batch, markdown]
63+ types_or : [python, c, c++, batch, markdown, toml, yaml ]
6364 # Validates TOML files.
6465 - id : check-toml
6566 # Validates YAML files.
9899 - id : add-trailing-comma
99100
100101- repo : https://github.com/astral-sh/ruff-pre-commit
101- # Matches Ruff version in requirements .
102+ # Matches Ruff version in pyproject .
102103 rev : v0.8.1
103104 hooks :
104105 - id : ruff
@@ -120,10 +121,18 @@ repos:
120121 - id : pyright
121122 alias : pyrightCI
122123 name : Check types with pyright
123- # use nodejs version of pyright and install requirements.txt for CI
124- additional_dependencies : ["-rrequirements.txt ", "pyright[nodejs]"]
124+ # use nodejs version of pyright and install pyproject.toml for CI
125+ additional_dependencies : [". ", "pyright[nodejs]"]
125126 stages : [manual] # Only run from CI manually
126127
128+ - repo : https://github.com/astral-sh/uv-pre-commit
129+ rev : 0.6.14
130+ hooks :
131+ - id : uv-lock
132+ name : Verify uv lock file
133+ # Override python interpreter from .python-versions as that is too strict for pre-commit.ci
134+ args : ["-p3.11"]
135+
127136- repo : local
128137 hooks :
129138 - id : scons-source
@@ -147,7 +156,7 @@ repos:
147156 types_or : [python, c, c++, batch]
148157 - id : licenseCheck
149158 name : Check license compatibility of pip dependencies
150- files : ^(requirements\.txt| runlicensecheck\.bat|pyproject\.toml)$
159+ files : ^(runlicensecheck\.bat|pyproject\.toml)$
151160 entry : ./runlicensecheck.bat
152161 language : script
153162 pass_filenames : false
0 commit comments