Skip to content

Commit

Permalink
👷 Update pre-commit.ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Feb 19, 2024
1 parent 3303ab1 commit 6d2a328
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 50 deletions.
50 changes: 15 additions & 35 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: fix-byte-order-marker
Expand All @@ -26,7 +26,7 @@ repos:
hooks:
- id: remove-crlf
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
Expand All @@ -38,23 +38,23 @@ repos:
args:
- --msg-filename
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.2
rev: 2.7.3
hooks:
- id: editorconfig-checker
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: check-mailmap
- repo: https://github.com/rhysd/actionlint
rev: v1.6.25
rev: v1.6.26
hooks:
- id: actionlint
- repo: https://github.com/adrienverge/yamllint
rev: v1.32.0
rev: v1.35.1
hooks:
- id: yamllint
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
Expand All @@ -64,48 +64,28 @@ repos:
- mdformat-toc
- mdformat-deflist
- mdformat-beautysh
- mdformat-black
- mdformat-ruff
- mdformat-config
- mdformat-web
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.8.1
rev: v0.12.1
hooks:
- id: markdownlint-cli2
additional_dependencies:
- markdown-it-texmath@0.9.1
- markdown-it-texmath
- repo: https://github.com/Freed-Wu/pre-commit-hooks
rev: 0.0.11
hooks:
- id: update-pyproject.toml
- repo: https://github.com/psf/black
rev: 23.7.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies:
- tomli
- id: ruff
- id: ruff-format
- repo: https://github.com/kumaraditya303/mirrors-pyright
rev: v1.1.322
rev: v1.1.350
hooks:
- id: pyright
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args:
- -cpyproject.toml
additional_dependencies:
- tomli
- repo: https://github.com/nix-community/nixpkgs-fmt
rev: v1.3.0
hooks:
- id: nixpkgs-fmt

ci:
skip:
Expand Down
49 changes: 34 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ classifiers = [
"Operating System :: MacOS",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dynamic = ["version", "dependencies", "optional-dependencies"]

Expand Down Expand Up @@ -56,25 +60,40 @@ file = "requirements.txt"
file = "requirements/dev.txt"
# end: scripts/update-pyproject.toml.pl

[tool.black]
line-length = 79

[tool.isort]
line_length = 79
profile = "black"

# https://github.com/PyCQA/pydocstyle/issues/418
[tool.pydocstyle]
add_ignore = "D205, D400"
[tool.mdformat]
number = true

[tool.doq]
template_path = "templates"

[tool.bandit]
skips = ["B404"]
[tool.ruff]
line-length = 79

[tool.bandit.assert_used]
skips = ["tests/*.py", "*_test.py", "test_*.py"]
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
]
ignore = ["D205", "D400"]
preview = true

[tool.ruff.format]
docstring-code-format = true
preview = true

[tool.coverage.report]
exclude_lines = ["if TYPE_CHECKING:", "if __name__ == .__main__.:"]
exclude_lines = [
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"\\s*import tomli as tomllib",
]

0 comments on commit 6d2a328

Please sign in to comment.