ruff-pycharm-plugin icon indicating copy to clipboard operation
ruff-pycharm-plugin copied to clipboard

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

Open Cherrymelon opened this issue 1 year ago • 3 comments
trafficstars

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):

  • IDE: [PyCharm Community 2024.1 ]
  • OS: [ macOS 14.4.1 ]
  • Ruff Version [0.3.7 ]
  • Plugin version [ 0.0.33 ]

Additional context my config image

Cherrymelon avatar Apr 17 '24 01:04 Cherrymelon

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

DonDebonair avatar May 25 '24 18:05 DonDebonair

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

Cherrymelon avatar May 28 '24 03:05 Cherrymelon

@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 :)

tstrych avatar May 29 '24 11:05 tstrych