build: apply ruff-format and black to more python files#12452
Merged
RayBB merged 2 commits intoApr 28, 2026
Merged
Conversation
Reduces the ruff-format exclude list and black files list from 31 to 12 files by removing entries no longer touched by open (non-draft) PRs. Part of: internetarchive#12260 Closes internetarchive#12450
Contributor
There was a problem hiding this comment.
Pull request overview
Updates pre-commit formatting configuration to apply ruff-format/black to more Python files by shrinking the set of files temporarily excluded due to open PR activity, keeping the ruff-format exclude list and black include list in sync.
Changes:
- Reduced the
ruff-formatexclude:regex list from 31 paths to 12. - Reduced the
blackfiles:regex list from 31 paths to 12 to match theruff-formatexclusions.
for more information, see https://pre-commit.ci
Member
|
Thank you for this PR, @ragini-pandey! Welcome to Open Library — this appears to be your first contribution. @RayBB is assigned to this PR and currently has:
PR triage checklist (maintainers / Pam)
Note This comment was automatically generated by Pam, Open Library's Project AI Manager, on behalf of @mekarpeles. Pam is designed to provide status visibility, perform basic project management functions and relevant codebase research, and provide actionable feedback so contributors aren't left waiting. |
Sadashii
pushed a commit
to Sadashii/openlibrary
that referenced
this pull request
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12450
Reduces the
ruff-formatexclude:list andblackfiles:list from 31 files to 12 files by removing entries no longer touched by open (non-draft) PRs. Both lists are kept in sync as required.The 19 files removed from the exclusion list:
openlibrary/core/lists/model.pyopenlibrary/plugins/openlibrary/bulk_tag.pyopenlibrary/plugins/openlibrary/status.pyopenlibrary/plugins/upstream/addbook.pyopenlibrary/plugins/upstream/addtag.pyopenlibrary/plugins/upstream/code.pyopenlibrary/plugins/upstream/covers.pyopenlibrary/plugins/upstream/jsdef.pyopenlibrary/plugins/worksearch/schemes/__init__.pyopenlibrary/plugins/worksearch/schemes/authors.pyopenlibrary/plugins/worksearch/schemes/lists.pyopenlibrary/plugins/worksearch/schemes/subjects.pyopenlibrary/utils/form.pyopenlibrary/utils/request_context.pyopenlibrary/utils/schema.pyscripts/find_duplicate_author.pyscripts/monitoring/fail2ban_monitor.pyscripts/monitoring/monitor.pyscripts/update_stale_ocaid_references.pyTechnical
Single commit updating only
.pre-commit-config.yaml. CI will auto-format the 19 newly unexcluded Python files.Testing
CI will run
ruff-formatandblackon the newly included files and auto-format them, confirming the formatting changes are automatic with no extra manual edits.Screenshot
N/A — no UI changes.
Stakeholders
@RayBB