FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ENH: Add concise __repr__ methods to ErrorSnapshot and PropagatedErrorSnapshot by basnijholt · Pull Request #927 · pipefunc/pipefunc · GitHub

ENH: Add concise __repr__ methods to ErrorSnapshot and PropagatedErrorSnapshot - #927

Merged
basnijholt merged 1 commit into
mainfrom
improve-error-snapshot-repr
Dec 12, 2025
Merged

ENH: Add concise __repr__ methods to ErrorSnapshot and PropagatedErrorSnapshot#927
basnijholt merged 1 commit into
mainfrom
improve-error-snapshot-repr

Conversation

Copy link
Copy Markdown
Collaborator

Summary

  • Add custom __repr__ methods to ErrorSnapshot and PropagatedErrorSnapshot
  • The default dataclass __repr__ shows all fields, making output very verbose when these objects appear in arrays

Before

array([0, 2, 4, 6, 8,
       ErrorSnapshot(function=<function double_it at 0x78e642d42840>, exception=ValueError('Intentional error...'), args=(), kwargs={'x': 5}, traceback='...very long...', timestamp='...', user='...', machine='...', ip_address='...', current_directory='...'),
       12, 14, 16, 18], dtype=object)

After

array([0, 2, 4, 6, 8,
       ErrorSnapshot('double_it', ValueError: Intentional error for demonstration.),
       12, 14, 16, 18], dtype=object)

The detailed __str__ output remains unchanged for when users explicitly print() these objects.

…shot

The default dataclass __repr__ shows all fields, making output very verbose
when these objects appear in arrays or other containers. Add custom __repr__
methods that show only essential information:

- ErrorSnapshot: function name, exception type and message
- PropagatedErrorSnapshot: function name and reason

The detailed __str__ output remains unchanged for when users explicitly
print() these objects.
basnijholt changed the title Add concise __repr__ methods to ErrorSnapshot and PropagatedErrorSnapshot ENH: Add concise __repr__ methods to ErrorSnapshot and PropagatedErrorSnapshot Dec 12, 2025

codspeed-hq Bot commented Dec 12, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #927 will not alter performance

Comparing improve-error-snapshot-repr (f812685) with main (11f11fa)

Summary

✅ 6 untouched

Copy link
Copy Markdown
Contributor

✅ PR Title Formatted Correctly

The title of this PR has been updated to match the correct format. Thank you!

basnijholt merged commit 396dd25 into main Dec 12, 2025
21 checks passed
basnijholt deleted the improve-error-snapshot-repr branch December 12, 2025 17:54

codecov Bot commented Dec 12, 2025
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pipefunc/exceptions.py 28.57% 5 Missing ⚠️
Files with missing lines Coverage Δ
pipefunc/exceptions.py 95.45% <28.57%> (-4.55%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL