koxudaxi / ruff-pycharm-plugin

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

can not work repalce ctrl + alt+l in Pycharm? #424

Open Cherrymelon opened 2 months ago

Cherrymelon commented 2 months ago

Describe the bug I found it show difference code formtter result when I use ctrl +alt+L and run ruff format, I'm sure enable run ruff when reformat code

To Reproduce Steps to reproduce the behavior:

  1. ctrl +alt+L
  2. watch result
  3. run ruff format for some py file
  4. See difference

Expected behavior same format result

Screenshots If applicable, add screenshots to help explain your problem. Also, gif movies are recommended. press ctrl +alt +l

image

run ruff format

image

Environments (please complete the following information):

Additional context my config

image
DonDebonair commented 1 month ago

I have the same problem. Reformat Code still seems to use the internal PyCharm code formatter and not Ruff.

Cherrymelon commented 1 month ago

I have the same problem. Reformat Code still seems to use the internal PyCharm code formatter and not Ruff.

try to confirm that you enable `Use ruff format(Experimental) for version 0.0.289 or later. It works for me

tstrych commented 1 month ago

@Cherrymelon 's answer Use ruff format(Experimental) for version 0.0.289 or later. worked for me as well.
I had the same issue as @DonDebonair with macbook m2, pycharm code style was applied until i checked the experimental tag, thanks.

It would be really useful if there is some documentation around options once you download the plugin :)