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
This is a case which I believe is potentially indicative of other bugs with the F601 fix.
Duplicated keys are merged by Ruff in the case of equal values, but the method by which this is done leads to a strange error in the case of different parenthesisation:
t={"x":"test123", "x":("test123")}
And the applied diff:
Fixed source has a syntax error where the source document does not. This is a bug in one of the generated fixes:
<filename>:1:17: E999 SyntaxError: unexpected token ')'
|
1 | t={"x":"test123")}
| ^ E999
|
Last generated fixes:
<filename>:1:19: F601 [*] Dictionary key literal `"x"` repeated
|
1 | t={"x":"test123", "x":("test123")}
| ^^^ F601
|
= help: Remove repeated key literal `"x"`
ℹ Suggested fix
1 |-t={"x":"test123", "x":("test123")}
1 |+t={"x":"test123")}
Source with applied fixes:
t={"x":"test123")}
This is a case which I believe is potentially indicative of other bugs with the F601 fix.
Duplicated keys are merged by Ruff in the case of equal values, but the method by which this is done leads to a strange error in the case of different parenthesisation:
And the applied diff:
Discovered by #4822.
The text was updated successfully, but these errors were encountered: