Skip to content

[Config lint] Update pre-commit hooks and ruff config#165

Merged
C-Achard merged 1 commit intomainfrom
cy/linter-ci
Mar 10, 2026
Merged

[Config lint] Update pre-commit hooks and ruff config#165
C-Achard merged 1 commit intomainfrom
cy/linter-ci

Conversation

@C-Achard
Copy link
Collaborator

@C-Achard C-Achard commented Feb 19, 2026

Add and reorganize pre-commit hooks

  • Merge this BEFORE [Apply lint] Add PR-only pre-commit workflow & lint all #166

  • Include check-added-large-files, check-yaml, check-toml, name-tests-test (with --pytest-test-first), check-merge-conflict

  • Replace setup-cfg-fmt with pyproject-fmt and add validate-pyproject.

  • Bump astral-sh/ruff-pre-commit to v0.15.0.

  • Enable Ruff configuration in pyproject.toml (lint rules, fix, target-version, line-length, pydocstyle convention)

  • Add [tool.pyproject-fmt] settings (max_supported_python=3.12, generate_python_version_classifiers=true, table_format="long") to control pyproject.toml formatting behavior.


This pull request updates and expands the project's pre-commit hooks and configuration, and enables previously commented-out linting and formatting settings in pyproject.toml. The main focus is on improving code quality and consistency by introducing new checks and formatting tools.

Pre-commit hook improvements:

  • Added new hooks to .pre-commit-config.yaml for checking large files, YAML and TOML syntax, test naming conventions, and merge conflicts; replaced the setup-cfg-fmt hook with pyproject-fmt and added validate-pyproject for validating pyproject.toml files.
  • Updated the ruff-pre-commit hook to a newer version (v0.15.0).

Configuration enhancements:

  • Enabled and configured tool.ruff and tool.ruff.lint.pydocstyle sections in pyproject.toml for linting and docstring style enforcement, and added configuration for pyproject-fmt.

Add and reorganize pre-commit hooks: include check-added-large-files, check-yaml, check-toml, name-tests-test (with --pytest-test-first), check-merge-conflict; replace setup-cfg-fmt with pyproject-fmt and add validate-pyproject. Bump astral-sh/ruff-pre-commit to v0.15.0. Uncomment and enable Ruff configuration in pyproject.toml (lint rules, fix, target-version, line-length, pydocstyle convention) and add [tool.pyproject-fmt] settings (max_supported_python=3.12, generate_python_version_classifiers=true, table_format="long") to control pyproject formatting behavior.
@C-Achard C-Achard self-assigned this Feb 19, 2026
@C-Achard C-Achard added enhancement New feature or request CI Related to the CI / workflows labels Feb 19, 2026
@C-Achard C-Achard changed the title [lint config] Update pre-commit hooks and ruff config [Config lint] Update pre-commit hooks and ruff config Feb 20, 2026
@C-Achard C-Achard requested a review from deruyter92 February 20, 2026 08:16
@C-Achard C-Achard merged commit 13bb616 into main Mar 10, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Related to the CI / workflows enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants