Skip to content

Document how to format code using ruff #807

Open

Description

@korydraughn

There are two ways to format PRC code. This is specifically about satisfying the GitHub Action formatting workflow.

Note

These options assume you have ruff installed on your computer.

Option 1 is to run the following on the directories which contain python code. If you leave off the directory, ruff has been known to touch python code in READMEs too (may not be what we want).

ruff format --preview irods/

Option 2 is to grab the git_ruff.py script from the GitHub reusable workflows and run the following.

git_ruff.py format [--since-commit=COMMIT]

Activity

  1. added this to the 3.4.0 milestone on Mar 17, 2026
  2. alanking commented on Mar 17, 2026

    @alanking
    Contributor

    Do these commands take the pyproject.toml file into account?

  3. korydraughn commented on Mar 17, 2026

    @korydraughn
    ContributorAuthor

    I believe so since it didn't take any additional args/flags to make the GHA workflow happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions