Skip to content

Update test_descrtut.py from 3.14.3#7149

Merged
youknowone merged 2 commits intoRustPython:mainfrom
ShaharNaveh:update-descrtut
Feb 15, 2026
Merged

Update test_descrtut.py from 3.14.3#7149
youknowone merged 2 commits intoRustPython:mainfrom
ShaharNaveh:update-descrtut

Conversation

@ShaharNaveh
Copy link
Contributor

@ShaharNaveh ShaharNaveh commented Feb 14, 2026

Summary by CodeRabbit

  • Refactor
    • Internal code formatting improvements to error handling in cryptographic functions.

Note: No user-facing changes in this release.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 14, 2026

📝 Walkthrough

Walkthrough

A formatting refactor in the PBKDF2-HMAC implementation consolidates a multi-line error-mapping chain into a single inline call. No functional behavior, control flow, or error handling semantics are affected.

Changes

Cohort / File(s) Summary
PBKDF2-HMAC Error Handling Refactor
crates/stdlib/src/hashlib.rs
Reformatted error mapping in dklen validation by converting a separate map_err block to an inline chained call, reducing line count by 1 while preserving identical behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A hop, a skip, through hashlib we go, ✨
Cleaner chains make the code glow,
One line becomes two, the error maps true,
No logic harmed—just prettier view! 🐰

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title references updating test_descrtut.py, but the actual changes are only to crates/stdlib/src/hashlib.rs with formatting adjustments to PBKDF2-HMAC error handling. Update the title to accurately reflect the actual changes, such as 'Format PBKDF2-HMAC error handling in hashlib.rs' or similar.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ 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

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.

❤️ Share

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

@github-actions
Copy link
Contributor

Code has been automatically formatted

The code in this PR has been formatted using:

  • cargo fmt --all
    Please pull the latest changes before pushing again:
git pull origin update-descrtut

@github-actions
Copy link
Contributor

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[ ] test: cpython/Lib/test/test_descr.py (TODO: 48)
[ ] test: cpython/Lib/test/test_descrtut.py (TODO: 3)

dependencies:

dependent tests: (no tests depend on descr)

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated

@youknowone youknowone merged commit c1a327d into RustPython:main Feb 15, 2026
14 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