代码拉取完成,页面将自动刷新
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
files: ^(j2lint|tests)/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
#exclude_types: [jinja, text]
- id: check-added-large-files
- id: check-merge-conflict
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- name: Check and insert license on Python files
id: insert-license
files: .*\.py$
args:
- --license-filepath
- .github/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --no-extra-eol
- name: Check and insert license on Jinja2 files
id: insert-license
files: .*\.j2$
args:
- --license-filepath
- .github/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --comment-style
- '{#||#}'
- --no-extra-eol
- repo: https://github.com/pycqa/flake8
rev: 7.1.0
hooks:
- id: flake8
name: Check for PEP8 error on Python files
args:
- --config=/dev/null
- --max-line-length=160
types: [python]
- repo: https://github.com/pycqa/pylint
rev: v3.2.5
hooks:
- id: pylint # Use pylintrc file in repository
name: Check for Linting error on Python files
description: This hook runs pylint.
types: [python]
args:
# Suppress duplicate code for modules header
- -d duplicate-code
additional_dependencies:
- jinja2
- rich
exclude: ^tests/
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: Check for changes when running isort on all python files
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
name: Check for changes when running Black on all python files
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
hooks:
- id: mypy
args:
- --config-file=pyproject.toml
# additional_dependencies:
# Do not run on test
files: ^(j2lint)/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。