Skip to content

Commit

Permalink
ci: Use ruff instead of some linters and formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Feb 17, 2024
1 parent e8aee0b commit 618661c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 37 deletions.
24 changes: 8 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
21 changes: 0 additions & 21 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 618661c

Please sign in to comment.