代码拉取完成,页面将自动刷新
---
exclude: ^(\.[^/]*cache(__)?/.*|(.*/)?\.coverage)$
repos:
# Perform Markdown formatting before other hooks "fixing" line endings:
# PROBLEM: it alters the .md file permissions from 644 to 600 :(
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
hooks:
- id: mdformat
name: Format Markdown
entry: mdformat # Executable to run, with fixed options
language: python
types: [markdown]
args: [--wrap, '75', --number]
additional_dependencies:
- mdformat-toc
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.0
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
exclude: tests/resources/main.*_with_license.cpp
- id: remove-tabs
exclude: tests/resources/main.*_with_license.cpp
- id: chmod
args: ['644']
exclude: (\.md$|^tests/resources/.*shebang)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
files: ''
exclude: tests/resources/main.*_with_license.cpp
- id: check-yaml
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args:
- --py37-plus
exclude: ^tests/resources/.*
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
exclude: ^tests/resources/
- repo: https://github.com/Lucas-C/pre-commit-hooks-bandit
rev: v1.0.6
hooks:
- id: python-bandit-vulnerability-check
args: [--skip, 'B101', --recursive, .]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
hooks:
- id: mypy
args:
- --ignore-missing-imports
- --install-types
- --non-interactive
- --check-untyped-defs
- --show-error-codes
- --show-error-context
- repo: local
hooks:
- id: pylint
name: pylint
# 3x faster than the official pylint hook, and has no issue with imports
# (tested with: time pre-commit run pylint --all-files)
language: system
entry: pylint
files: \.py$
exclude: ^tests/resources/.*(init_with_license|todo)
- id: pytest
name: pytest
language: python
additional_dependencies: [pytest, pytest-cov, coverage, rapidfuzz]
entry: pytest -sv
require_serial: true
pass_filenames: false
files: \.py$
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。