2022-05-24 11:50:26 +03:00
|
|
|
# See https://pre-commit.com for more information
|
|
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
|
|
# See https://github.com/pre-commit/pre-commit-hooks/blob/master/.pre-commit-config.yaml for an example with more hooks
|
|
|
|
|
2022-06-02 00:02:32 +03:00
|
|
|
ci:
|
2022-06-29 14:00:57 +03:00
|
|
|
autofix_prs: true
|
2022-06-08 18:20:02 +03:00
|
|
|
autoupdate_commit_msg: "ENH: Autoupdate hooks [pre-commit.ci]"
|
|
|
|
autoupdate_schedule: monthly
|
2022-06-02 00:02:32 +03:00
|
|
|
|
2022-05-24 11:50:26 +03:00
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2023-02-21 20:06:12 +03:00
|
|
|
rev: v4.4.0
|
2022-05-24 11:50:26 +03:00
|
|
|
hooks:
|
|
|
|
- id: check-ast # Simply check whether the files parse as valid python
|
|
|
|
- id: check-yaml # Attempts to load all yaml files to verify syntax
|
|
|
|
|
|
|
|
- id: check-added-large-files # Prevent giant files from being committed
|
|
|
|
- id: check-docstring-first # Checks a common error of defining a docstring after code
|
|
|
|
- id: check-merge-conflict # Check for files that contain merge conflict strings
|
|
|
|
- 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
|
|
|
|
- id: trailing-whitespace # This hook trims trailing whitespace
|
|
|
|
- id: mixed-line-ending # Replaces or checks mixed line ending
|
|
|
|
- id: check-shebang-scripts-are-executable # Checks that scripts with shebangs are executable
|
|
|
|
|
|
|
|
# The structure of this was suggested by the author of pre-commit and maintainer of flake8
|
|
|
|
# See https://stackoverflow.com/a/66485642/3956024
|
|
|
|
- repo: https://github.com/PyCQA/flake8
|
2023-02-21 20:06:12 +03:00
|
|
|
rev: 6.0.0
|
2022-05-24 11:50:26 +03:00
|
|
|
hooks:
|
|
|
|
- id: flake8
|
|
|
|
name: flake8 ./hi-ml/
|
|
|
|
alias: flake8-hi-ml
|
|
|
|
files: ^hi-ml/
|
|
|
|
args: [--config, hi-ml/.flake8]
|
|
|
|
- id: flake8
|
|
|
|
name: flake8 ./hi-ml-azure/
|
|
|
|
alias: flake8-hi-ml-azure
|
|
|
|
files: ^hi-ml-azure/
|
|
|
|
args: [--config, hi-ml-azure/.flake8]
|
|
|
|
- id: flake8
|
2022-07-18 15:40:47 +03:00
|
|
|
name: flake8 ./hi-ml-cpath/
|
|
|
|
alias: flake8-hi-ml-cpath
|
|
|
|
files: ^hi-ml-cpath/
|
|
|
|
args: [--config, hi-ml-cpath/.flake8]
|
2022-06-27 14:02:55 +03:00
|
|
|
- id: flake8
|
2022-06-28 18:20:47 +03:00
|
|
|
name: flake8 ./hi-ml-multimodal/
|
|
|
|
alias: flake8-hi-ml-multimodal
|
|
|
|
files: ^hi-ml-multimodal/
|
|
|
|
args: [--config, hi-ml-multimodal/.flake8]
|
2022-05-24 11:50:26 +03:00
|
|
|
|
2023-03-21 12:21:09 +03:00
|
|
|
- repo: https://github.com/psf/black
|
2023-04-04 19:28:34 +03:00
|
|
|
rev: 23.3.0
|
2022-05-24 11:50:26 +03:00
|
|
|
hooks:
|
2023-03-21 12:21:09 +03:00
|
|
|
- id: black
|
|
|
|
extend-exclude: ^docs/source/amulet/amulet_script.py
|
|
|
|
args: [--line-length, "120", --skip-string-normalization]
|