Skip to content

Remove/move some dead methods #10743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 13, 2025

Conversation

cdrini
Copy link
Collaborator

@cdrini cdrini commented May 8, 2025

Small refactor.

Technical

Testing

Screenshot

Stakeholders

@Copilot Copilot AI review requested due to automatic review settings May 8, 2025 11:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the codebase by removing outdated/unused methods from the home module and relocating the implementation of format_work_data to the code module.

  • Removed dead methods (format_list_editions, pick_best_edition, and format_work_data) from home.py.
  • Added an updated version of format_work_data to code.py.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
openlibrary/plugins/openlibrary/home.py Removed unused/dead methods and associated memoization logic.
openlibrary/plugins/openlibrary/code.py Replaced the removed format_work_data import with a new definition.
Comments suppressed due to low confidence (1)

openlibrary/plugins/openlibrary/code.py:292

  • [nitpick] The use of 'key' as the loop variable in the list comprehension shadows the previously defined variable 'key'. Consider renaming it (e.g., to 'author_key') to improve clarity.
for key, name in zip(work['author_key'], work['author_name'])

@mekarpeles mekarpeles merged commit f96ef14 into internetarchive:master May 13, 2025
4 checks passed
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