diff --git a/buidl/bcur.py b/buidl/bcur.py index e0b876a..8122059 100644 --- a/buidl/bcur.py +++ b/buidl/bcur.py @@ -85,7 +85,7 @@ def _parse_bcur_helper(bcur_string): y_int = int(xofy_parts[1]) if x_int > y_int: - raise BCURStringFormatError("x must be >= y (in x-of-y): {xofy_parts}") + raise BCURStringFormatError(f"x must be >= y (in x-of-y): {xofy_parts}") else: raise BCURStringFormatError(f"{string} doesn't have 2-4 slashes") diff --git a/buidl/descriptor.py b/buidl/descriptor.py index 40c5dd3..3c43b4e 100644 --- a/buidl/descriptor.py +++ b/buidl/descriptor.py @@ -78,11 +78,11 @@ def parse_full_key_record(key_record_str): parts = key_record_str.split("/") if parts[-1] != "*": raise ValueError( - "Invalid full key record, does not end with a *: {key_record_str}" + f"Invalid full key record, does not end with a *: {key_record_str}" ) if not is_intable(parts[-2]): raise ValueError( - "Invalid full key record, account index `{parts[-2]}` is not an int: {key_record_str}" + f"Invalid full key record, account index `{parts[-2]}` is not an int: {key_record_str}" ) # Now we strip off the trailing account index and *, and parse the rest as a partial key record diff --git a/buidl/hd.py b/buidl/hd.py index 1c23de6..741d584 100644 --- a/buidl/hd.py +++ b/buidl/hd.py @@ -709,7 +709,7 @@ def raw_parse(cls, s, network=None): elif pub_version in ALL_MAINNET_XPUBS: network = "mainnet" else: - raise ValueError("not a valid [t-z]pub pub_version: {pub_version}") + raise ValueError(f"not a valid [t-z]pub pub_version: {pub_version}") # the next byte is depth depth = byte_to_int(s.read(1)) # next 4 bytes are the parent_fingerprint diff --git a/buidl/psbt.py b/buidl/psbt.py index 34485c0..92bbb13 100644 --- a/buidl/psbt.py +++ b/buidl/psbt.py @@ -773,7 +773,7 @@ def _describe_basic_multisig_inputs(self, hdpubkey_map): if not root_paths_for_signing: raise SuspiciousTransaction( - "No `root_paths_for_signing` with `hdpubkey_map` {hdpubkey_map} in PSBT:\n{self}" + f"No `root_paths_for_signing` with `hdpubkey_map` {hdpubkey_map} in PSBT:\n{self}" ) return {