Skip to content

Improve error messages from concatenated functions.#74

Merged
hmgaudecker merged 1 commit into
use-jb-for-docsfrom
improve-error-message
Mar 7, 2026
Merged

Improve error messages from concatenated functions.#74
hmgaudecker merged 1 commit into
use-jb-for-docsfrom
improve-error-message

Conversation

@hmgaudecker

Copy link
Copy Markdown
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
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov

codecov Bot commented Mar 6, 2026

Copy link
Copy Markdown

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 Harness.
📢 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

@timmens timmens left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very nice!

@hmgaudecker hmgaudecker merged commit 4b94d8a into use-jb-for-docs Mar 7, 2026
22 checks passed
@hmgaudecker hmgaudecker deleted the improve-error-message branch March 7, 2026 15:12
@MImmesberger MImmesberger restored the improve-error-message branch March 7, 2026 15:24
@MImmesberger MImmesberger deleted the improve-error-message branch March 7, 2026 15:27
hmgaudecker added a commit that referenced this pull request Mar 7, 2026
* Build docs using pixi.
* Improve docs and simplify build process.
* Add llms.txt
* Execute notebooks during build
* Update CLAUDE.md
* Improve docs: mermaid graphs, named functions, better error display.
* Fix a missing 'verify_annotations' -- forgot to invoke it for create_tree_with_input_types
* Improve formatting of error message.
* Improve error messages from concatenated functions. (#74)

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