◐ Shell
clean mode source ↗

[update_lib] fix hard_deps resolution and fix commit not to miss test data by youknowone · Pull Request #7058 · RustPython/RustPython

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The PR modifies dependency tracking in scripts/update_lib/. The quick() function now returns a list of collected paths (data directories and hard dependencies) instead of None, enabling callers to extend their dependency lists. Meanwhile, deps.py refines import resolution logic to skip test_ modules during extraction and unifies non-test import path resolution.

Changes

Cohort / File(s) Summary
Quick function return value
scripts/update_lib/cmd_quick.py
Changed quick() return type from None to list[pathlib.Path]. Introduced internal extra_paths accumulator to collect migrated dependencies and copied data directories. Updated docstring and propagated return value to callers, which now extend hard_deps_for_commit with collected paths.
Import resolution logic
scripts/update_lib/deps.py
Modified test dependency extraction to skip imports from test\_ modules entirely, delegating them to separate update_lib entries. Unified non-test import path resolution using a single lookup with fallback, removing previous branching logic between test and support module handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • moreal
  • ShaharNaveh

Poem

🐰 Dependencies now hop back home,
Paths collected, no more to roam,
Quick returns what it finds,
Tests skip their own kinds,
A cleaner update_lib zone! 🌟

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.