diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index bc00ee8e25..b43efa32e2 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -68,6 +68,7 @@ def generated? go_lock? || poetry_lock? || pdm_lock? || + uv_lock? || esy_lock? || npm_shrinkwrap_or_package_lock? || pnpm_lock? || @@ -422,6 +423,13 @@ def pdm_lock? !!name.match(/pdm\.lock/) end + # Internal: Is the blob a generated uv.lock? + # + # Returns true or false. + def uv_lock? + !!name.match(/uv\.lock/) + end + # Internal: Is the blob a generated esy lock file? # # Returns true or false. diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index aae547bd83..98b1e06a8c 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -7079,6 +7079,7 @@ TOML: - Pipfile - pdm.lock - poetry.lock + - uv.lock tm_scope: source.toml ace_mode: toml codemirror_mode: toml diff --git a/samples/TOML/filenames/uv.lock b/samples/TOML/filenames/uv.lock new file mode 100644 index 0000000000..83d1f03a13 --- /dev/null +++ b/samples/TOML/filenames/uv.lock @@ -0,0 +1,34 @@ +version = 1 +requires-python = ">=3.12" + +[[package]] +name = "click" +version = "8.1.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "platform_system == 'Windows'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", size = 336121 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", size = 97941 }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, +] + +[[package]] +name = "uv-click-example" +version = "0.1.0" +source = { editable = "." } +dependencies = [ + { name = "click" }, +] + +[package.metadata] +requires-dist = [{ name = "click", specifier = ">=8.1.7" }] diff --git a/test/test_generated.rb b/test/test_generated.rb index 3738586d2a..99efa815fa 100644 --- a/test/test_generated.rb +++ b/test/test_generated.rb @@ -203,6 +203,9 @@ def test_check_generated # pdm generated_sample_without_loading_data("TOML/filenames/pdm.lock") + # uv + generated_sample_without_loading_data("TOML/filenames/uv.lock") + # coverage.py `coverage html` output generated_sample_without_loading_data("htmlcov/index.html") generated_sample_without_loading_data("htmlcov/coverage_html.js")