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
Okay, I'll be the first to say it, but this bug is really not that important. I'm reporting it primarily because it implies that there may be other issues with semicolon/newline processing in other situations I haven't observed yet.
The following snippet is a valid Python script (no trailing newline):
0\
;
Ruff attempts to correct it to the following (with trailing newline, but it's escaped):
0\
As a result, there is an EOF syntax error. This only applies to a situation where a) there is a semicolon at the end of the input (no trailing newline), and b) the line before is escaped.
Okay, I'll be the first to say it, but this bug is really not that important. I'm reporting it primarily because it implies that there may be other issues with semicolon/newline processing in other situations I haven't observed yet.
The following snippet is a valid Python script (no trailing newline):
0\ ;
Ruff attempts to correct it to the following (with trailing newline, but it's escaped):
0\
As a result, there is an EOF syntax error. This only applies to a situation where a) there is a semicolon at the end of the input (no trailing newline), and b) the line before is escaped.
Discovered with #4822.
The text was updated successfully, but these errors were encountered: