Skip to content

refactor lists_json_post in prep for fastapi#11991

Merged
RayBB merged 1 commit intomasterfrom
fastapi-prep/lists_json_post
Mar 4, 2026
Merged

refactor lists_json_post in prep for fastapi#11991
RayBB merged 1 commit intomasterfrom
fastapi-prep/lists_json_post

Conversation

@RayBB
Copy link
Collaborator

@RayBB RayBB commented Mar 3, 2026

This will make it easier to migrate to FastAPI.

PR #11991: Refactors lists_json_post in prep for fastapi
Changes Made:

  1. Extracts logic into new process_new_list static method
  2. Changes self.process_seeds() → lists_json.process_seeds() (both are identical - call ListRecord.normalize_input_seed)
  3. Spam check now raises ValueError("Spam list") caught by caller instead of directly calling self.forbidden()
    Risks: None identified
    The refactor is safe:
  • Both process_seeds implementations are identical
  • Error handling behavior is preserved
  • Uses same patterns as existing code (process_seeds_update already uses lists_json.process_seeds)
  • The new exception handling flow for spam produces the same result
    The PR is a straightforward extraction/refactor with no functional changes.

Copy link
Collaborator

@lokesh lokesh left a comment

Choose a reason for hiding this comment

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

LGTM

@RayBB RayBB merged commit bd0d7b8 into master Mar 4, 2026
8 checks passed
@RayBB RayBB deleted the fastapi-prep/lists_json_post branch March 4, 2026 22:02
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