From d75729b578ee6f6c9b8f3826fd8d252477e7f6ef Mon Sep 17 00:00:00 2001 From: python357-1 <30739625+python357-1@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:07:51 -0600 Subject: [PATCH] docs: update CONTRIBUTING.md ruff instructions (#581) * docs: add warning about ruff on linux * Update CONTRIBUTING.md Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com> --------- Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com> --- CONTRIBUTING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 67a0019f1..db6d7fa7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,8 +92,12 @@ A Python linter and code formatter. Ruff uses the `pyproject.toml` as its config #### Running Locally -- Lint code by moving into the `/tagstudio` directory with `cd tagstudio` and running `ruff --config ../pyproject.toml`. -- Format code with `ruff format` inside the repository directory +Inside the root repository directory: +- Lint code with `ruff check` + - Some linting suggestions can be automatically formatted with `ruff check --fix` +- Format code with `ruff format` + +Ruff should automatically discover the configuration options inside the [pyproject.toml](https://github.com/TagStudioDev/TagStudio/blob/main/pyproject.toml) file. For more information, see the [ruff configuration discovery docs](https://docs.astral.sh/ruff/configuration/#config-file-discovery). Ruff is also available as a VS Code [extension](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff), PyCharm [plugin](https://plugins.jetbrains.com/plugin/20574-ruff), and [more](https://docs.astral.sh/ruff/integrations/).