koxudaxi / ruff-pycharm-plugin

PyCharm plugin for ruff. This plugin provides reformat code using ruff.
MIT License
196 stars 9 forks source link

"ruff format" reformats the entire file with the "reformat code" action #281

Closed fnep closed 7 months ago

fnep commented 11 months ago

Describe the bug When "use ruff format" is enabled and only a portion of the code is selected, the "reformat code" action reformats the entire file instead of only the selected code.

To Reproduce Steps to reproduce the behavior:

  1. Enable "use ruff format"
  2. Select only a few lines of a larger file
  3. Run Edit -> Reformat Code
  4. The whole file is reformatted instead

Expected behavior Only the selected code should be reformatted.

Environments (please complete the following information):

fnep commented 7 months ago

Very cool, thank you for fixing this 😊

koxudaxi commented 7 months ago

@fnep I have released the fixed version as 0.0.29 Thank you for your patience.

bookin commented 2 months ago

Do nothing (default IDE action, looks like) with selected code in the PyCharm 2023.3.2 (Professional Edition) MacOs