From 4208d2d7c4219927f18092889ad49f0f4328c353 Mon Sep 17 00:00:00 2001 From: Vaibhav159 Date: Tue, 17 Dec 2024 23:38:36 +0530 Subject: [PATCH 1/2] updating readme to support auto-formatting of ruff in pycharm --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index f63d85167..9f2d59c86 100644 --- a/README.md +++ b/README.md @@ -224,6 +224,15 @@ Install the } ``` +### PyCharm + +`ruff` was installed in the `venv` environment described before, now to enable autoformatting on save, go to `File` -> `Settings` -> `Tools` -> `File Watchers` and add a new watcher with the following settings: +1. **Name**: `Ruff formatter` +2. **File type**: `Python` +3. **Working directory**: `$ContentRoot$` +4. **Arguments**: `format $FilePath$ --config pyproject.toml` +5. **Program**: `$PyInterpreterDirectory$/ruff` + ## Contributing We welcome contributions from the community! Whether you're fixing bugs, improving documentation, or adding new features, here's how you can help: From 53049adeeabc79a67bfe1f3c1646b5f582c7222c Mon Sep 17 00:00:00 2001 From: Vaibhav159 Date: Wed, 18 Dec 2024 00:47:00 +0530 Subject: [PATCH 2/2] removing --config flag --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f2d59c86..01e8dfea5 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,7 @@ Install the 1. **Name**: `Ruff formatter` 2. **File type**: `Python` 3. **Working directory**: `$ContentRoot$` -4. **Arguments**: `format $FilePath$ --config pyproject.toml` +4. **Arguments**: `format $FilePath$` 5. **Program**: `$PyInterpreterDirectory$/ruff` ## Contributing