Conversation
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt |
PR Summary by QodoClarify valuecounter multi-field argument usage
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
There was a problem hiding this comment.
🟢 Approval recommended
Documentation changes are validated with tests and a strict Sphinx build.
Pull request overview
Clarifies valuecounter() field-selection documentation without changing runtime behavior.
Changes:
- Documents positional fields and tuple unpacking.
- Adds executable mixed-field examples.
- Records the correction in the changelog.
File summaries
| File | Summary |
|---|---|
petl/util/counting.py |
Updates valuecounter() documentation and doctests. |
docs/changes.rst |
Records the documentation clarification. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Coverage Report for CI Build 34686667306Coverage remained the same at 92.066%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This PR corrects the
valuecounter()field-selection documentation referenced in #641. The docstring currently says a tuple of field names or indexes can be passed directly, butvaluecounter(table, fields)raisesFieldSelectionError; multiple fields must be separate positional arguments or unpacked with*fields.Changes
docs/changes.rst.The public API and counting behavior are unchanged. This addresses the documentation mismatch discussed in #641; it does not change exception formatting.
Validation
On Windows with Python 3.9.13:
FieldSelectionError; the unpacked tuple and equivalent positional fields return the expected counts.python -m pytest -v petl/test/util/test_counting.py --doctest-modules petl/util/counting.py -k 'test_ or valuecounter': 12 passed, 9 deselected, on both the base and updated tree. Thevaluecounterdoctest now contains seven examples instead of three.python -m sphinx -W -b html docs ../docs-html: build succeeded.git diff --check: passed.The full test suite, tox version matrix, and hosted CI have not been run for this documentation-only change.
Checklist
docs/changes.rst.master(deb9618); relevant pytest/doctest checks rerun before publication.Refs #641.