Skip to content

Don't return frozenset for modules#7276

Merged
youknowone merged 1 commit intoRustPython:mainfrom
ShaharNaveh:fix-deps-frozen
Mar 1, 2026
Merged

Don't return frozenset for modules#7276
youknowone merged 1 commit intoRustPython:mainfrom
ShaharNaveh:fix-deps-frozen

Conversation

@ShaharNaveh
Copy link
Contributor

@ShaharNaveh ShaharNaveh commented Feb 28, 2026

Summary by CodeRabbit

  • Refactor
    • Updated internal return types for improved code consistency. No user-facing changes.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2833cd8 and 33c5d84.

📒 Files selected for processing (1)
  • scripts/update_lib/deps.py

📝 Walkthrough

Walkthrough

The ImportVisitor class in scripts/update_lib/deps.py has been modified to return mutable set[str] instead of immutable frozenset[str] from its test_imports and lib_imports properties. Return expressions were updated accordingly.

Changes

Cohort / File(s) Summary
Return Type Changes
scripts/update_lib/deps.py
Updated test_imports and lib_imports property return types from frozenset[str] to set[str]. Modified return expressions to construct and return mutable sets instead of frozensets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A frozenset once held so tight,
Now sets flow free with mutable might!
From immutable bonds we hop away,
Flexibility wins the coding day! 🌿✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: converting frozenset return types to mutable set types in the ImportVisitor class methods.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 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.

@youknowone youknowone merged commit b05e74b into RustPython:main Mar 1, 2026
13 checks passed
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