chore: replace black with ruff format in template toolchain #25
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
To unify the linting and formatting toolchain and improve performance, we should switch from
blacktoruff format. This transition has already been successfully implemented in theopos2project (PR #373).Proposed Changes:
.pre-commit-config.yaml:https://github.com/psf/blackrepository entry.ruff-formathook to the existinghttps://github.com/astral-sh/ruff-pre-commitentry.pyproject.toml:blackfrom all dependency groups (e.g.,develop,lint).[tool.black]configuration section.ruff format .to ensure the template codebase is formatted according to the new standard.poetry lock).This change will reduce the number of tools required in the CI/CD pipeline and local development environments.
Note: When implementing this change, it is crucial to run
ruff format .immediately after updating the configuration to ensure all files in the repository are consistent with the new formatter. This should be committed along with the configuration changes to avoid CI failures.