You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The WithItem range is 6..17 which contains this part of the source code a := b) as, as you can see the left parenthesis and the x is missing from the range. The correct range would be 5..18.
## Summary
Given `with (a := b): pass`, we truncate the `WithItem` range by one on
both sides such that the parentheses are part of the statement, rather
than the item. However, for `with (a := b) as x: pass`, we want to avoid
this trick.
Closes#8913.
Ruff version: v0.1.6
In the following code snippet
The
WithItem
range is6..17
which contains this part of the source codea := b) as
, as you can see the left parenthesis and thex
is missing from the range. The correct range would be5..18
.Here is the AST.
The text was updated successfully, but these errors were encountered: