MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / rename_account_transform

Function rename_account_transform

beanhub_cli/format.py:76–87  ·  view source on GitHub ↗
(
    replacements: dict[str, str], tree_or_token: TreeOrToken
)

Source from the content-addressed store, hash-verified

74
75
76def rename_account_transform(
77 replacements: dict[str, str], tree_or_token: TreeOrToken
78) -> TreeOrToken | None:
79 if not isinstance(tree_or_token, Token):
80 return
81 if tree_or_token.type != "ACCOUNT":
82 return
83 if tree_or_token.value not in replacements:
84 return
85 new_token = copy.deepcopy(tree_or_token)
86 new_token.value = replacements[tree_or_token.value]
87 return new_token
88
89
90def rename_commodity_transform(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected