Skip to content

Add ruff as universal linter for cclib #1306

@Anselmoo

Description

@Anselmoo

With RUFF, cclib can be listed by one tool including maintenance tasks like Python version compatibility checks.

Setup can be easily incorporated into existing pyproject.toml like:

[tool.ruff]
line-length = 88
target-version = "py38"
select = ["ALL"]
fix = true

ignore = ["ANN101"] # annotations for self
src = ["umf"]

[tool.ruff.per-file-ignores]
"umf/**/test_*.py" = [
    "PLR2004", # magic value comparison
    "S101",    # use of assert detected
    "TCH002",  # third party import (for pytest)
]

[tool.ruff.pydocstyle]
convention = "google"

[tool.ruff.isort]
known-first-party = ["cclib"]
force-single-line = true
lines-between-types = 1
lines-after-imports = 2
required-imports = ["from __future__ import annotations"]

Finallys, hooks for GitHub Action or pre-commit are available.

See also: #1303

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions