Skip to content

[pull] main from openrewrite:main#207

Merged
pull[bot] merged 3 commits intoTheTechOddBug:mainfrom
openrewrite:main
Feb 25, 2026
Merged

[pull] main from openrewrite:main#207
pull[bot] merged 3 commits intoTheTechOddBug:mainfrom
openrewrite:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Feb 25, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…ma outside (#6811)

The parser incorrectly identified `(` as the tuple's opening paren in
expressions like `("a"),` where the parentheses wrap the element and the
trailing comma outside creates an implicit single-element tuple. This caused
the token index to fall behind the AST position, eventually crashing with
`'NoneType' object has no attribute 'value_source'` when parsing string
literals in type annotations like `Literal["..."]` later in the file.
…renthesization (#6814)

Two fixes in the Python template system:

1. PatternMatchingComparator: Change default fallthrough from `return True`
   to `return False` so unhandled node types reject matches instead of
   silently accepting. Add explicit handlers for Empty (sentinel) and
   ArrayAccess nodes.

2. PlaceholderReplacementVisitor: Auto-wrap substituted expressions in
   parentheses when they have lower operator precedence than the
   surrounding context. For example, `template("{a} and {b}")` with
   `b = x or y` now correctly produces `a and (x or y)` instead of
   `a and x or y`. Handles Binary, Python Binary, and Unary (not).
@pull pull bot locked and limited conversation to collaborators Feb 25, 2026
@pull pull bot added the ⤵️ pull label Feb 25, 2026
@pull pull bot merged commit 9416341 into TheTechOddBug:main Feb 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant