Closed remisalmon closed 6 months ago
This is fixing a bug where the line range end (inclusive) is incremented twice, first line 32 just above resulting in formatting an extra line of text.
Tested with Spyder, before:
https://github.com/python-lsp/python-lsp-server/assets/26257211/9db88c47-d251-42f1-83f1-14f897230665
After:
https://github.com/python-lsp/python-lsp-server/assets/26257211/81e79f6c-ae9d-4440-bae2-ec8fe7650a76
Same logic in the black plugin:
This is fixing a bug where the line range end (inclusive) is incremented twice, first line 32 just above resulting in formatting an extra line of text.
Tested with Spyder, before:
https://github.com/python-lsp/python-lsp-server/assets/26257211/9db88c47-d251-42f1-83f1-14f897230665
After:
https://github.com/python-lsp/python-lsp-server/assets/26257211/81e79f6c-ae9d-4440-bae2-ec8fe7650a76
Same logic in the black plugin: