edit: get_selected_paths - #24
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesSelected path normalization
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This change normalizes selected file entries to URLs before size calculation, addressing compatibility with newer yazi versions. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. ✨ Finishing Touches🧪 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 |
Apparently recent versions of yazi changed cx.active.selected to return file objects rather than url objects. However, fs.calc_size() still strictly expects a url object. Passing a file object causes a 'userdata is not expected type' error in my setup.
To fix this, I updated the get_selected_paths function to extract the url property from the returned object. It fixed my issue, I don't know if it can be useful to you.
Summary by CodeRabbit