Skip to content

Change ruff to docformatter 1.7.8 #184

Description

@stevenhua0320

Problem

We want to change back to docformatter to be consistent with the lint check

Proposed solution

replace the block of code

 # ruff - An extremely fast Python linter and code formatter, written in Rust.
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.15.12
    hooks:
      - id: ruff-check
        args: [--fix, --config, ./pyproject.toml]

to

- repo: https://github.com/PyCQA/docformatter
    rev: v1.7.8
    hooks:
      - id: docformatter
        additional_dependencies: [tomli]
        args: [--in-place, --config, ./pyproject.toml]

in the .pre-commit-config.yaml and change

[tool.ruff]
line-length = 72

[tool.ruff.lint.pydocstyle]
convention = "numpy"

to

[tool.docformatter]
recursive = true
wrap-summaries = 72
wrap-descriptions = 72

in the pyproject.toml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions