Skip to content

dead code#1031

Merged
fshowalter merged 2 commits intomainfrom
draft
Mar 7, 2026
Merged

dead code#1031
fshowalter merged 2 commits intomainfrom
draft

Conversation

@fshowalter
Copy link
Owner

No description provided.

@fshowalter fshowalter enabled auto-merge (squash) March 6, 2026 18:06
@claude
Copy link

claude bot commented Mar 6, 2026

Claude finished @fshowalter's task in 1m 16s —— View job


PR Review: dead code

  • Gather context
  • Review changes
  • Post feedback

This is a clean dead-code removal PR. Here's the breakdown:

Deleted files — all confirmed truly dead

All 6 deleted files have zero remaining imports in the codebase:

  • json_author.py, json_author_with_reviewed_works.py — shared TypedDict definitions, no longer used
  • json_work.py, json_work_author.py, json_reviewed_work.py, json_maybe_reviewed_work.py — same
  • reading_entries.py — a full export module including an export() function, but it was never wired into exports/api.py, so it was never actually called

stats.py changes

JsonMostReadAuthor simplified:

# Before
name: str
count: int
slug: str
reviewed: bool
readings: list[str]

# After
count: int
author: str  # stores the slug
reviewed: bool
readings: list[str]

The name field removal also eliminates a linear author lookup (next(author.name for author in repository_data.authors if author.slug == author_slug)) — a nice performance improvement for large datasets.

works.py changes

JsonWorkAuthor.slug renamed to author — consistent with the naming convention used in stats.py.

Notes

  • The JSON output format changes (slugauthor, removal of name) are intentional API contract changes. If any downstream consumers (e.g. a web frontend) rely on these field names, they'll need to be updated in sync.
  • No test coverage for the deleted reading_entries.py export — but since it wasn't wired into api.py, it was effectively untestable/unused anyway.

Overall: straightforward and correct. Nothing to flag. ✓

@fshowalter fshowalter merged commit 3f79c8c into main Mar 7, 2026
8 checks passed
@fshowalter fshowalter deleted the draft branch March 7, 2026 02:31
@fshowalter fshowalter restored the draft branch March 7, 2026 02:32
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