diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3c95cab..a0fc504 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,23 +1,15 @@ repos: - - repo: https://github.com/psf/black - rev: 22.10.0 - hooks: - - id: black + - repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.2.1 + hooks: + # Run the linter. + - id: ruff + # Run the formatter. + - id: ruff-format - repo: https://github.com/PyCQA/doc8 rev: v1.0.0 hooks: - id: doc8 args: - --max-line-length=119 - - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 - hooks: - - id: flake8 - - repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: - - id: isort - - repo: https://github.com/PyCQA/pydocstyle - rev: 6.1.1 - hooks: - - id: pydocstyle diff --git a/pyproject.toml b/pyproject.toml index ee0c3f8..1bcf09c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,13 @@ sphinx = [ Home = "https://github.com/attakei-lab/rst-pypi-ref" Repository = "https://github.com/attakei-lab/rst-pypi-ref" +[tool.ruff.lint] +select = ["C90", "D", "E", "F", "I", "W"] +ignore = ["D100", "D101", "D102", "D103", "D104", "D107", "D200", "D203", "D213", "D400"] + +[tool.ruff.lint.pydocstyle] +convention = "pep257" + [tool.rye] managed = true dev-dependencies = [ diff --git a/setup.cfg b/setup.cfg index f34b0aa..d6ace37 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,24 +15,3 @@ ignore-path = *.egg-info,.tox,.venv,var, doc/_build,demo/_build max-line-length = 119 - -[flake8] -ignore = D203 -exclude = - .git,__pycache__,.venv,dist, - */conf.py, - tests/*/__init__.py, -max-complexity = 10 -max-line-length = 88 - -[isort] -skip = doc/*.py -multi_line_output = 3 -line_length = 88 -include_trailing_comma = true - -[pycodestyle] -max-line-length = 88 - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D107,D200,D203,D213,D400