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
Currently, Ruff would concatenate it into a single source and pass it to the parser. This means that the parser would see it as:
deffoo():
print("first")
print("second")
Which is a valid code. But, actually the indentation before the second print statement is invalid as it is in another cell.
A possible solution, as suggested by @MichaReiser, would be to run the parser per cell, merge the statements, and update the node ranges for all the subsequent cells with the correct offset.
The text was updated successfully, but these errors were encountered:
Taking the following 2 code cells as an example:
Cell 1:
Cell 2:
Currently, Ruff would concatenate it into a single source and pass it to the parser. This means that the parser would see it as:
Which is a valid code. But, actually the indentation before the second print statement is invalid as it is in another cell.
A possible solution, as suggested by @MichaReiser, would be to run the parser per cell, merge the statements, and update the node ranges for all the subsequent cells with the correct offset.
The text was updated successfully, but these errors were encountered: