Describe the bug
I think this is some weird interaction / race condition between PyCharm and the Ruff plugin running ruff on save.
Running the Ruff plugin on save removes the line break PyCharm is trying to add the the end of the file.
To Reproduce
Editor->General->Ensure every saved file ends with a line break
,\n
at the end, everything works as expected (i.e. there's nothing weird going on). But, if I remove that line break, and (with the cursor at some other line) try to save, the line break gets added and then immediately removed, and the file is marked as having unsaved changes (see the flashing 4
in the gif).Expected behavior
A line break is added at the file end, and the file is saved.
Environments (please complete the following information):
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too