Skip to content

Accept .lock files (e.g. uv.lock) in file-extension validation - #228

Open
priya-sundaram-dev wants to merge 1 commit into
TheAlgorithms:masterfrom
priya-sundaram-dev:allow-lock-files
Open

Accept .lock files (e.g. uv.lock) in file-extension validation#228
priya-sundaram-dev wants to merge 1 commit into
TheAlgorithms:masterfrom
priya-sundaram-dev:allow-lock-files

Conversation

@priya-sundaram-dev

Copy link
Copy Markdown

As discussed with @cclauss in TheAlgorithms/Python#15105, the changed-file extension check currently rejects any PR that touches uv.lock, because .lock is not in ACCEPTED_EXTENSIONS.

uv.lock is committed to keep CI reproducible, and some fixes live only there — e.g. bumping the pinned transitive typing-extensions so the build passes on a new Python release. Those PRs are currently blocked by the keeper even though they're legitimate.

Change: add .lock to PythonParser.ACCEPTED_EXTENSIONS (covers uv.lock, poetry.lock, etc.) and add a test case asserting uv.lock is now valid.

  • Minimal, scoped to lock files only.
  • Lock files are still ignored by the doctest/naming parser (only .py files are parsed), so this only affects the file-validity check.
  • Keeps the lockfile committed and reviewable in the diff, rather than gitignoring it.

Ref: TheAlgorithms/Python#15105

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.

@cclauss cclauss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhruvmanila Your review please. @priya-sundaram-dev has been doing great work on modernizing the Python repo and could be unblocked by this change to the keeper.

Thanks for all your wonderful achievements since we met working on the repo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants