diff --git a/.github/workflows/reusable-ruff.yml b/.github/workflows/reusable-ruff.yml index fe24520..b1cc2bd 100644 --- a/.github/workflows/reusable-ruff.yml +++ b/.github/workflows/reusable-ruff.yml @@ -20,8 +20,5 @@ jobs: - name: Ruff linting check run: ruff check --output-format=github . - - name: Ruff imports check - run: ruff check --select I --output-format=github . - - name: Ruff format check run: ruff format --diff . diff --git a/README.md b/README.md index 1f3a7b0..37ff60b 100644 --- a/README.md +++ b/README.md @@ -232,11 +232,28 @@ src = ["src", "tests"] indent-style = "space" quote-style = "single" +[tool.ruff.lint] +extend-select = [ + "UP", # pyupgrade + "D", # pydocstyle + "ANN", # annotations + "PTH", # use-pathlib-pth +] + +[tool.ruff.lint.pydocstyle] +convention = "google" + [tool.ruff.lint.isort] case-sensitive = true lines-after-imports = 2 ``` +Ruff can automatically fix many linting errors and reformat code to match your Python style by running these commands: +```shell +ruff check --fix . +ruff format . +``` + ### [`reusable-git-object-name.yml`](./.github/workflows/reusable-git-object-name.yml) Outputs the human-readable git object name from [`git describe --dirty --tags --long --match "*[0-9]*"`](https://git-scm.com/docs/git-describe)