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 following source code is incorrectly round-tripped by ruff_python_ast::source_code::round_trip:
defd():
defe():
pass
The result is:
defd():
defe():
pass
Which is invalid syntax.
This error does not seem to persist to the Ruff command line. The cause appears to be that newlines are explicitly invoked for def and some other types, but the indent is not applied afterward. This appears to affect all types of def in unparse_stmt, so I'm not quite sure how this isn't propagating to frontend.
The following source code is incorrectly round-tripped by
ruff_python_ast::source_code::round_trip
:The result is:
Which is invalid syntax.
This error does not seem to persist to the Ruff command line. The cause appears to be that newlines are explicitly invoked for
def
and some other types, but the indent is not applied afterward. This appears to affect all types ofdef
inunparse_stmt
, so I'm not quite sure how this isn't propagating to frontend.Discovered by #4822
The text was updated successfully, but these errors were encountered: