From f4c705c434ec24c5e0c582d5e47ce34068c7020d Mon Sep 17 00:00:00 2001 From: johnthagen Date: Sat, 13 Dec 2025 07:39:41 -0500 Subject: [PATCH] Document native PyCharm Ruff integration --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8646a25f..2907e66a 100644 --- a/README.md +++ b/README.md @@ -502,19 +502,17 @@ project: ## Ruff Integration -Integrate [Ruff](https://docs.astral.sh/ruff/editors/setup/#pycharm) linting and -formatting into PyCharm. +PyCharm natively supports [Ruff](https://docs.astral.sh/ruff/editors/setup/#pycharm) linting and +formatting. -### Linting and Formatting +1. Open Preferences or Settings | Python | Tools | Ruff + - **Check**: Enable + - Open **All Actions on Save...** + - **Check**: Reformat Code + - Files:Python -1. Install the [Ruff PyCharm Plugin](https://plugins.jetbrains.com/plugin/20574-ruff) -2. Open Preferences or Settings | Tools | Ruff - - **Check**: Run Ruff when the python file is saved - - **Check**: Use Import Optimizer - - **Check**: Use ruff format - -Now, on ctrl+s, the current source file will be automatically formatted and imports -sorted on save. +Now, on ctrl+s, the current source file will be automatically formatted and linting +errors will be shown within the editor. > [!TIP] > These tools work best if you properly mark directories as excluded from the project that should