Skip to content

Fix ShorthandParseSyntaxError message showing literal placeholder instead of caret#10494

Open
mangodxd wants to merge 1 commit into
aws:developfrom
mangodxd:fix/shorthand-error-location-caret
Open

Fix ShorthandParseSyntaxError message showing literal placeholder instead of caret#10494
mangodxd wants to merge 1 commit into
aws:developfrom
mangodxd:fix/shorthand-error-location-caret

Conversation

@mangodxd

Copy link
Copy Markdown

The _construct_msg method in ShorthandParseSyntaxError was missing an prefix on the last string fragment, so {self._error_location()} was printed literally instead of showing the caret. This made shorthand parsing errors much harder to diagnose — the carets were the main way to locate the mistake in long expressions.

Also adds a test asserting the message content includes both the input and the caret.

…tead of caret

The _construct_msg method was missing an 'f' prefix on the last
string fragment, so '{self._error_location()}' was printed literally
instead of showing the caret pointing at the parse failure position.

Fixes aws#10467
@mangodxd
mangodxd requested a review from a team as a code owner July 17, 2026 04:51
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.

1 participant