Fix missing f-string prefixes on error messages#167
Merged
Conversation
Strings with {variable} interpolation were missing the f prefix,
causing the literal text "{variable}" to appear in error messages
instead of the variable's value.
- bcur.py:88 — BCURStringFormatError message
- descriptor.py:81,85 — ValueError messages (2 instances)
- hd.py:712 — ValueError message
- psbt.py:776 — SuspiciousTransaction message
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
Good catch |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Five error message strings contained
{variable}interpolation syntax but were missing thefprefix, causing the literal text like"{key_record_str}"to appear in error messages instead of the actual variable value.Fixes
bcur.pyBCURStringFormatError{xofy_parts}descriptor.pyValueError{key_record_str}descriptor.pyValueError{parts[-2]},{key_record_str}hd.pyValueError{pub_version}psbt.pySuspiciousTransaction{hdpubkey_map},{self}Test plan
🤖 Generated with Claude Code