Skip to content

Commit 1b2d65c

Browse files
authored
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 1b2d65c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)