Skip to content

enable RUF059#11764

Merged
mekarpeles merged 2 commits intomasterfrom
fix/enable-RUF059
Feb 9, 2026
Merged

enable RUF059#11764
mekarpeles merged 2 commits intomasterfrom
fix/enable-RUF059

Conversation

@RayBB
Copy link
Copy Markdown
Collaborator

@RayBB RayBB commented Jan 29, 2026

This pull request makes several minor code improvements across the codebase by renaming unused variables to use the conventional underscore prefix. This enhances code readability and makes it clear which variables are intentionally unused. No functional changes are introduced.

Most important changes:

Code readability improvements (unused variable naming):

  • Replaced unused variables with underscore-prefixed names in multiple functions across the codebase, including get_resource_id (openlibrary/core/lending.py), render_list_preview_image (openlibrary/coverstore/code.py), test_doctest (openlibrary/coverstore/tests/test_doctests.py and openlibrary/plugins/books/tests/test_doctests.py), parse_data_table (openlibrary/data/__init__.py), read_data_file, split_dump, and make_index (openlibrary/data/dump.py), GET (openlibrary/plugins/books/code.py), POST (openlibrary/plugins/importapi/code.py), find_type (openlibrary/utils/sentry.py), and log_api_failure (scripts/gh_scripts/issue_comment_bot.py). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Linting configuration:

  • Removed the RUF059 lint rule from the ignore list in pyproject.toml, possibly re-enabling this lint check after pre-commit updates.

Closes #11745

Fix was auto generated by ruff

We temporarily disabled it for the ruff upgrade. Now can examine the fixes closely.

Technical

Testing

Screenshot

Stakeholders

@RayBB RayBB requested a review from cdrini January 29, 2026 02:19
@RayBB RayBB changed the title fix/enable RUF059 enable RUF059 Jan 29, 2026
@mekarpeles mekarpeles merged commit 8a684b2 into master Feb 9, 2026
8 checks passed
@mekarpeles mekarpeles self-assigned this Feb 9, 2026
@RayBB RayBB removed the On Testing label Feb 10, 2026
@RayBB RayBB deleted the fix/enable-RUF059 branch February 12, 2026 02:34
bhardwajparth51 added a commit to bhardwajparth51/openlibrary that referenced this pull request Feb 17, 2026
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.

Temporarily disable RUF059 and renable it to upgrade our pre-commit rules

2 participants