Skip to content

Document how to format code using ruff #807

@korydraughn

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]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions