modelscope-text-to-video-synthesis / .pre-commit-config.yaml
kafarasi's picture
Update .pre-commit-config.yaml
6c24ff9 verified
raw
history blame
1.82 kB
exclude: patch
repos:
# Base code quality hooks (unchanged from your config)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-yaml
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: mixed-line-ending
args: ['--fix=lf']
- id: requirements-txt-fixer
- id: trailing-whitespace
# Documentation formatting
- repo: https://github.com/myint/docformatter
rev: v1.4
hooks:
- id: docformatter
args: ['--in-place']
# Import sorting
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ['--profile', 'black']
# Type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
args: ['--ignore-missing-imports']
additional_dependencies:
- types-python-slugify
- types-PyYAML
- types-requests
# Formatting
- repo: https://github.com/google/yapf
rev: v0.32.0
hooks:
- id: yapf
args: ['--style', '{based_on_style: google, indent_width: 2}']
# AI/ML specific additions
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args: ['-x', 'tests', '-ll']
exclude: 'migrations|test_.*|tests/'
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.275
hooks:
- id: ruff
args: ['--fix']
# Notebook checking
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
hooks:
- id: nbqa-ruff
additional_dependencies: ['ruff==0.0.275']
- id: nbqa-mypy