Skip to content

Remove unused _membership_iter_search - #6318

Merged
youknowone merged 1 commit into
RustPython:mainfrom
youknowone:_membership_iter_search
Dec 2, 2025
Merged

youknowone merged 1 commit into
RustPython:mainfrom
youknowone:_membership_iter_search

Conversation

@youknowone

@youknowone youknowone commented Dec 2, 2025 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Removed unused internal utility functions
    • Simplified module dependencies and imports
    • Cleaned up documentation notes

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 2, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request removes unused imports and an internal helper function from the VM operations module, while removing documentation notes from the range builtin module. No functional behavior changes are introduced.

Changes

Cohort / File(s) Summary
Code Cleanup
crates/vm/src/vm/vm_ops.rs
Removed unused imports (PyInt, PyIntRef, PyIterReturn); deleted internal helper function _membership_iter_search
Documentation Removal
crates/vm/src/builtins/range.rs
Removed preceding notes about merging with search helpers and potential placement in vm.rs

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Straightforward removal of unused imports and internal helper function with no logic changes
  • Small number of affected files with consistent pattern
  • Minimal risk given the deletions are clean and isolated

Poem

🐰 A cleanup hop through tangled code,
Where unused imports bore their load,
We swept them clean, a helper too,
Now lighter flies our VM through!
🌟

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main change: removing the unused _membership_iter_search function from vm_ops.rs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9130dd8 and 64a64dd.

📒 Files selected for processing (2)
  • crates/vm/src/builtins/range.rs (0 hunks)
  • crates/vm/src/vm/vm_ops.rs (1 hunks)
💤 Files with no reviewable changes (1)
  • crates/vm/src/builtins/range.rs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.rs: Follow the default rustfmt code style by running cargo fmt to format Rust code
Always run clippy to lint Rust code (cargo clippy) before completing tasks and fix any warnings or lints introduced by changes
Follow Rust best practices for error handling and memory management
Use the macro system (pyclass, pymodule, pyfunction, etc.) when implementing Python functionality in Rust

Files:

  • crates/vm/src/vm/vm_ops.rs
🔇 Additional comments (2)
crates/vm/src/vm/vm_ops.rs (2)

532-535: Verify that the removed _membership_iter_search function is not referenced elsewhere.

The _contains implementation correctly delegates to the sequence protocol's contains method, which is the standard approach. The removal of the _membership_iter_search helper simplifies the codebase by relying on existing sequence containment logic.


5-7: Verify that removed imports are unused across the codebase.

The removal of PyIntRef and PyIterReturn from imports appears correct, especially since the _membership_iter_search function that likely used them has been removed. However, verify that no other code in the codebase references these types before merging.


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 marked this pull request as ready for review December 2, 2025 00:59
@youknowone
youknowone merged commit bf8152b into RustPython:main Dec 2, 2025
@youknowone
youknowone deleted the _membership_iter_search branch December 2, 2025 01:11
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