Skip to content

refactor list_subjects_json in prep for fastapi#11987

Merged
RayBB merged 1 commit intomasterfrom
fastapi-prep/list_subjects_json
Mar 3, 2026
Merged

refactor list_subjects_json in prep for fastapi#11987
RayBB merged 1 commit intomasterfrom
fastapi-prep/list_subjects_json

Conversation

@RayBB
Copy link
Copy Markdown
Collaborator

@RayBB RayBB commented Mar 3, 2026

No description provided.

@RayBB
Copy link
Copy Markdown
Collaborator Author

RayBB commented Mar 3, 2026

AI review

PR #11987 Review Summary
What it does: Refactors list_subjects_json in openlibrary/plugins/openlibrary/lists.py in preparation for fastapi migration.
Changes:

  • Renamed get_subjects() → get_subjects_data() and made it a @staticmethod
  • Made _process_subject() a @staticmethod
  • Fixed a bug where loop variable key shadowed the key parameter, causing incorrect links
  • Changed self._process_subject(s) → list_subjects_json._process_subject(s)
    Risks: None identified.
    The refactor is safe and the class reference is valid.

@RayBB RayBB merged commit 30d7dde into master Mar 3, 2026
8 checks passed
@RayBB RayBB deleted the fastapi-prep/list_subjects_json branch March 3, 2026 01:13
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.

1 participant