[lint config] Update pre-commit hooks and ruff config#165
Open
[lint config] Update pre-commit hooks and ruff config#165
Conversation
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.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add and reorganize pre-commit hooks
Merge this BEFORE [lint apply] 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:
.pre-commit-config.yamlfor checking large files, YAML and TOML syntax, test naming conventions, and merge conflicts; replaced thesetup-cfg-fmthook withpyproject-fmtand addedvalidate-pyprojectfor validatingpyproject.tomlfiles.ruff-pre-commithook to a newer version (v0.15.0).Configuration enhancements:
tool.ruffandtool.ruff.lint.pydocstylesections inpyproject.tomlfor linting and docstring style enforcement, and added configuration forpyproject-fmt.