Files
UAV-CO2/.pre-commit-config.yaml

73 lines
2.9 KiB
YAML

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files # prevents giant files from being committed
args: ["--maxkb=1024"]
- id: check-ast # simply checks whether the files parse as valid python
- id: check-builtin-literals # requires literal syntax when initializing empty or zero python builtin types
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems
- id: check-docstring-first # checks a common error of defining a docstring after code
- id: check-executables-have-shebangs # ensures that (non-binary) executables have a shebang
- id: pretty-format-json # pretty formats json files
- id: check-json # checks json files for syntax errors
- id: check-merge-conflict # prevents git merge conflicts from being committed (finds conflict markers)
- id: check-shebang-scripts-are-executable # ensures that (non-binary) files with a shebang are executable
- id: check-toml # checks toml files for syntax errors
- id: check-vcs-permalinks # ensures that links to vcs websites are permalinks
- id: check-yaml # checks yaml files for parseable syntax
- id: debug-statements # checks for debugger imports and py37+ `breakpoint()` calls in python source
# - id: detect-aws-credentials # detects *your* aws credentials from the aws cli credentials file
- id: detect-private-key # detects the presence of private keys
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline
files: ^.*py$
- id: mixed-line-ending # replaces or checks mixed line ending
files: ^.*py$
- id: no-commit-to-branch
args: ["--branch", "main", "--branch", "develop"]
- id: requirements-txt-fixer # sorts entries in requirements.txt
- id: trailing-whitespace # trims trailing whitespace
files: ^.*py$
- repo: local
hooks:
- id: nbdev
name: nbdev clean
entry: nbdev_clean --clear_all
pass_filenames: false
language: python
files: .ipynb
- id: mypy
name: mypy
entry: mypy
language: python
files: ^.*py$
- id: vulture
name: vulture
entry: vulture
args: ["--min-confidence", "61"]
language: python
files: ^.*py$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix]
- id: ruff-format
types_or: [python, pyi, jupyter]
# ci:
# autofix_commit_msg: |
# [pre-commit.ci] auto fixes from pre-commit.com hooks
# for more information, see https://pre-commit.ci
# autofix_prs: true
# autoupdate_branch: ""
# autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
# autoupdate_schedule: monthly
# skip: []
# submodules: false