Skip to content

Improve error messages from concatenated functions.#74

Open
hmgaudecker wants to merge 1 commit intouse-jb-for-docsfrom
improve-error-message
Open

Improve error messages from concatenated functions.#74
hmgaudecker wants to merge 1 commit intouse-jb-for-docsfrom
improve-error-message

Conversation

@hmgaudecker
Copy link
Member

Set __name__ on the inner function so signature enforcement produces:

The concatenated function is missing ...

instead of

concatenated() missing ...

Drop "()" from all fail_if* format strings and add "is" before "missing".

Note: Since the same error message is used by with_signature, we can't just change the error message itself.

@hmgaudecker hmgaudecker requested a review from timmens March 6, 2026 12:02
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.37%. Comparing base (8d6ef96) to head (99167fc).

Files with missing lines Patch % Lines
tests/test_signature.py 83.33% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           use-jb-for-docs      #74      +/-   ##
===================================================
- Coverage            95.45%   95.37%   -0.09%     
===================================================
  Files                   25       25              
  Lines                 1167     1188      +21     
===================================================
+ Hits                  1114     1133      +19     
- Misses                  53       55       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Set __name__ on the inner function so signature enforcement produces
"The concatenated function is missing ..." instead of "concatenated() missing ...".
Drop "()" from all _fail_if_* format strings and add "is" before "missing".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hmgaudecker hmgaudecker force-pushed the improve-error-message branch from 74c5da3 to 99167fc Compare March 6, 2026 12:15
Copy link
Member

@timmens timmens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

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