Open clement-escolano opened 7 months ago
@clement-escolano I'm sorry for my late reply. Thank you for your creating the issue. OK, I will check your suggestion to see whether I can implement it.
This is a very important issue that needs addressing. I am willing to implement a fix. Could you point me in the right direction?
@KotlinIsland I'm sorry. I haven't looked into it yet, I will investigate this weekend.
@koxudaxi This field isn't editable (#379), Can we just not save it to the XML file?
@KotlinIsland
detectRuffExecutable
writes the python path in the xml file by using RuffConfigService
.
I can see the path in the xml.
https://github.com/koxudaxi/ruff-pycharm-plugin/blob/d5fc96f277f20780d7ac2546d899b16d6150b4d8/src/com/koxudaxi/ruff/Ruff.kt#L129
I would recommend against using $PROJECT_DIR$
and instead use $PyInterpreterDirectory$
, it would be highly unlikely that a project would include an exe for ruff outside the venv, and some venvs are not within the project dir (poetry)
Is your feature request related to a problem? Please describe. In the project I am currently working on, we all use PyCharm and share some of the IDE configurations (stored in the
.idea
folder). We would like to share the configuration of the Ruff plugin but this is not possible currently as not all developers installed Python in the same way and the path of ruff executable is not the same for everyone and this path is written in theruff.xml
configuration file.Describe the solution you'd like A way to share the
ruff.xml
file with people that don't have the same path to ruff. Some ideas (I don't know if there are feasible):$PYTHONHOME/bin/ruff
)Describe alternatives you've considered Not having the path in the file works (the plugin auto-detects it probably) but from time to time (mostly when opening the Ruff plugin in the settings modal), the
ruff.xml
file is modified to add the path which makes it cumbersome to the other people.Additional context None