用户工具

站点工具


django:pre-commit

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

后一修订版
前一修订版
django:pre-commit [2025/08/20 14:46] – 创建 bestonydjango:pre-commit [2025/08/20 14:48] (当前版本) bestony
行 4: 行 4:
  
 <code copy Bash [enable_line_numbers="true"]>uv run pre-commit install</code> <code copy Bash [enable_line_numbers="true"]>uv run pre-commit install</code>
 +
 +
 +===== conf =====
 +<code copy Bash [enable_line_numbers="true"]>touch .pre-commit-config.yaml</code>
 +
 +<code copy yaml [enable_line_numbers="true"]>
 +# See https://pre-commit.com for more information
 +# See https://pre-commit.com/hooks.html for more hooks
 +repos:
 +-   repo: https://github.com/pre-commit/pre-commit-hooks
 +    rev: v3.2.0
 +    hooks:
 +    -   id: trailing-whitespace
 +    -   id: end-of-file-fixer
 +    -   id: check-yaml
 +    -   id: check-added-large-files
 +- repo: https://github.com/astral-sh/ruff-pre-commit
 +  # Ruff version.
 +  rev: v0.12.9
 +  hooks:
 +    # Run the linter.
 +    - id: ruff-check
 +      args: [ --fix ]
 +    # Run the formatter.
 +    - id: ruff-format
 +
 +</code>
/storage/data/attic/django/pre-commit.1755701187.txt.gz · 最后更改: bestony

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki