Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR changes download APIs to return ChangesDownload result and batch handling
IndexedEntity Sequence and slicing fix
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant download_batch
participant _safe_download
participant BatchResult
Caller->>download_batch: request batch download
download_batch->>BatchResult: create result
loop each parsed id
download_batch->>_safe_download: call download_api
alt success
_safe_download->>BatchResult: add(DownloadResult)
else exception
_safe_download->>BatchResult: failed[id] = exception
end
end
download_batch-->>Caller: return BatchResult
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/jmcomic/api.py`:
- Around line 33-42: The batch download flow currently marks items as successful
too early via the internal callback in _safe_download and download_api, which
can leave partially failed items in both the success set and result.failed.
Update the success bookkeeping so add() or equivalent success recording happens
only after the single-item download has fully completed and
raise_if_has_exception() has passed, using the existing download_api, callback,
and BatchResult/result.failed flow to keep total and iteration consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 57d78563-190a-4ed1-aa53-3a8e92cb9136
📒 Files selected for processing (6)
src/jmcomic/__init__.pysrc/jmcomic/api.pysrc/jmcomic/jm_async_client.pysrc/jmcomic/jm_downloader.pysrc/jmcomic/jm_entity.pytests/test_jmcomic/test_jm_client.py
Summary by CodeRabbit
IndexErrorbehavior).0value instead of using the default.2.7.1.