Skip to content

Commit a5237c4

Browse files
committed
Redefine uv.lock have custom 'uvlock' file type
(Sorry not sure what the right terminology is.) The main reason to do this is because `ruff` can lint the `uv.lock` file and it uses `types_or` to match files. If `ruff` were to match against 'toml' in its `types_or` it would match too many files. So the idea is to merge this then update ruff's hook definition to ```diff - id: ruff-check name: ruff check description: "Run 'ruff check' for extremely fast Python linting" entry: ruff check --force-exclude language: python + types_or: [python, pyi, jupyter, uvlock] - types_or: [python, pyi, jupyter] ``` I got this idea by looking at how jenkinfiles is defined; although it's a groovy file, it has a custom jenkinsfile-specific file type in this extensions file.
1 parent bc5fa61 commit a5237c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

identify/extensions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@
434434
'sys.config': EXTENSIONS['erl'],
435435
'sys.config.src': EXTENSIONS['erl'],
436436
'Tiltfile': {'text', 'tiltfile'},
437-
'uv.lock': EXTENSIONS['toml'],
437+
'uv.lock': {'text', 'toml', 'uvlock'},
438438
'Vagrantfile': EXTENSIONS['rb'],
439439
'WORKSPACE': EXTENSIONS['bzl'],
440440
'wscript': EXTENSIONS['py'],

0 commit comments

Comments
 (0)