From 43e1bcf9164d97397958ba0a2a023bcff53d5428 Mon Sep 17 00:00:00 2001 From: Priya Sundaram Date: Sat, 29 Aug 2026 07:21:14 +0000 Subject: [PATCH] Accept .lock files (uv.lock) in changed-file validation Lock files such as uv.lock are committed to keep CI reproducible. A transitive dependency bump (e.g. bumping the pinned typing-extensions so the build passes on a new Python) lives only in uv.lock, which the file extension check previously rejected as an invalid file. Add .lock to the accepted extensions so those PRs are allowed, with a test covering it. --- algorithms_keeper/parser/python_parser.py | 3 +++ tests/test_parser.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/algorithms_keeper/parser/python_parser.py b/algorithms_keeper/parser/python_parser.py index 61cebb9..4e7d485 100644 --- a/algorithms_keeper/parser/python_parser.py +++ b/algorithms_keeper/parser/python_parser.py @@ -72,6 +72,9 @@ class PythonParser(BaseFilesParser): ".csv", ".json", ".txt", + # Lock files (e.g. ``uv.lock``, ``poetry.lock``) are committed to keep CI + # reproducible; a transitive dependency bump lives only here, so allow it. + ".lock", # Good old Python file ".py", *DOCS_EXTENSIONS, diff --git a/tests/test_parser.py b/tests/test_parser.py index 6cf830e..805eee2 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -56,6 +56,8 @@ def test_contains_testfile(parser: PythonParser, expected: int) -> None: get_parser("test/test.html, test/test.cpp, test/test.py"), "test/test.html, test/test.cpp", ), + # Lock files are committed for reproducible CI, so they are valid. + (get_parser("uv.lock, sol1.py"), ""), ), ) def test_validate_extension(parser: PythonParser, expected: str) -> None: