Skip to content

Update test_builtin.py from 3.14.2#6979

Merged
youknowone merged 4 commits into
RustPython:mainfrom
ShaharNaveh:update-test-builtin
Feb 3, 2026
Merged

Update test_builtin.py from 3.14.2#6979
youknowone merged 4 commits into
RustPython:mainfrom
ShaharNaveh:update-test-builtin

Conversation

@ShaharNaveh

@ShaharNaveh ShaharNaveh commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced error messaging for min() and max() functions to provide clearer feedback when operating on empty iterables.

@ShaharNaveh ShaharNaveh changed the title Update test_builtins.py from 3.14.2 Update test_builtin.py from 3.14.2 Feb 3, 2026
@coderabbitai

coderabbitai Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Updated error message in the min_or_max function to report "iterable argument is empty" instead of "arg is an empty sequence" when zero candidate values are provided to min() or max() functions.

Changes

Cohort / File(s) Summary
Error Message Update
crates/vm/src/stdlib/builtins.rs
Modified error message text in min_or_max error path from "arg is an empty sequence" to "iterable argument is empty" when handling empty iterables.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • youknowone

Poem

🐰 A message refined, so simple and clear,
When min and max find no values near,
"Iterable empty!" the error now states,
A hop and a skip through the semantic gates! 🌟

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title references updating 'test_builtin.py' from 3.14.2, but the actual changes are to 'crates/vm/src/stdlib/builtins.rs' with an error message update in the min_or_max function. Update the title to accurately reflect the actual changes, such as 'Update min_or_max error message for empty iterables' or similar.
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 (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

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

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

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

[x] test: cpython/Lib/test/test_builtin.py (TODO: 38)

dependencies:

dependent tests: (no tests depend on builtin)

Legend:

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

@youknowone youknowone merged commit 27d70fd into RustPython:main Feb 3, 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