Skip to content

build: remove tests and partials.py from ruff/black formatting denylist#12405

Merged
RayBB merged 2 commits intointernetarchive:masterfrom
shoaib-inamdar:12260/build/expand-ruff-format-to-tests-and-partials
Apr 17, 2026
Merged

build: remove tests and partials.py from ruff/black formatting denylist#12405
RayBB merged 2 commits intointernetarchive:masterfrom
shoaib-inamdar:12260/build/expand-ruff-format-to-tests-and-partials

Conversation

@shoaib-inamdar
Copy link
Copy Markdown
Contributor

@shoaib-inamdar shoaib-inamdar commented Apr 17, 2026

These files were previously protected from ruff-format because they were touched by active open PRs. Those PRs have since been merged, so the files should now be formatted by ruff by default.

Removed from both ruff-format exclude and black files lists:

  • openlibrary/plugins/openlibrary/partials.py
  • openlibrary/plugins/upstream/tests/test_addbook.py
  • openlibrary/plugins/upstream/tests/test_models.py
  • openlibrary/tests/core/lists/test_model.py
  • openlibrary/tests/fastapi/test_partials.py
  • openlibrary/tests/test_templates.py
  • scripts/conftest.py
  • scripts/monitoring/tests/test_fail2ban_monitor.py

pre-commit.ci will auto-format these files as needed.

Closes #12260

Technical

Testing

Screenshot

Stakeholders

shoaib-inamdar and others added 2 commits April 18, 2026 01:27
These files were previously protected from ruff-format because they were
touched by active open PRs. Those PRs have since been merged, so the files
should now be formatted by ruff by default.

Removed from both ruff-format exclude and black files lists:
- openlibrary/plugins/openlibrary/partials.py
- openlibrary/plugins/upstream/tests/test_addbook.py
- openlibrary/plugins/upstream/tests/test_models.py
- openlibrary/tests/core/lists/test_model.py
- openlibrary/tests/fastapi/test_partials.py
- openlibrary/tests/test_templates.py
- scripts/conftest.py
- scripts/monitoring/tests/test_fail2ban_monitor.py

pre-commit.ci will auto-format these files as needed.
@shoaib-inamdar
Copy link
Copy Markdown
Contributor Author

@RayBB , are these files changes correct

@RayBB RayBB marked this pull request as ready for review April 17, 2026 20:15
Copy link
Copy Markdown
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

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

Awesome thanks very much for doing this. It's such a big help. I've been fighting with partials a bit today dude to this.

Hopefully we can do the rest of the files soon!

@RayBB RayBB merged commit 3170622 into internetarchive:master Apr 17, 2026
3 checks passed
@jimchamp
Copy link
Copy Markdown
Collaborator

@RayBB, please make sure that CI checks are passing before merging branches into master.

@RayBB
Copy link
Copy Markdown
Collaborator

RayBB commented Apr 17, 2026

@jimchamp the CI checks were passing on this branch before merging.
I merged at 1:15PTD and the checks passed at 1:03 and 1:04

Is there something I'm missing here?

@jimchamp
Copy link
Copy Markdown
Collaborator

Here is the commit that had failing checks.

Here is the job that failed.

It looks like several branches were merged into master w/ failing checks. Looking into how to prevent this from happening in the future.

@RayBB
Copy link
Copy Markdown
Collaborator

RayBB commented Apr 20, 2026

@jimchamp How am I supposed to verify that CI checks are passing if those checks only run after the code is merged into master?

This particular check only applies to JS files, which are not touched at all by this PR.

IvanPisquiy06 pushed a commit to IvanPisquiy06/openlibrary that referenced this pull request Apr 27, 2026
…st (internetarchive#12405)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
IvanPisquiy06 pushed a commit to IvanPisquiy06/openlibrary that referenced this pull request Apr 27, 2026
…st (internetarchive#12405)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

Improve Auto-Fix Support for Code Style Issues Across the Repo

3 participants