Make HASH/HASHXOF types immutable by moreal · Pull Request #7131 · RustPython/RustPython
📝 Walkthrough
Walkthrough
The changes add IMMUTABLETYPE flags to PyHasher and PyHasherXof class definitions in the hashlib module, marking them as immutable types. No behavioral or functional modifications are introduced; only class attribute flags are updated.
Changes
| Cohort / File(s) | Summary |
|---|---|
Hashlib Type Immutability crates/stdlib/src/hashlib.rs |
Added IMMUTABLETYPE flag to PyHasher and PyHasherXof class definitions to mark them as immutable types. |
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~5 minutes
Suggested reviewers
- youknowone
Poem
🐰 Two hashes now wear crowns of stone,
Immutable, forever known,
No changing their crystalline ways,
Forever locked in Python's maze! ✨
🚥 Pre-merge checks | ✅ 2 | ❌ 2
❌ Failed checks (2 warnings)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | 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. | |
| Merge Conflict Detection | ❌ Merge conflicts detected (8 files): ⚔️ These conflicts must be resolved before merging into |
Resolve conflicts locally and push changes to this branch. |
✅ 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 directly summarizes the main change: adding IMMUTABLETYPE flags to PyHasher and PyHasherXof classes to mark them as immutable types. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
⚔️ Resolve merge conflicts (beta)
- Auto-commit resolved conflicts to branch
fix/fail-hashlib-test_readonly_types - Post resolved changes as copyable diffs in a comment
No actionable comments were generated in the recent review. 🎉
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 @coderabbitai help to get the list of available commands and usage tips.