.pre-commit-config.yaml 1.78 KB
Newer Older
1 2 3
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
4 5
  - repo: https://github.com/timothycrosley/isort
    rev: 5.0.4
6
    hooks:
7 8 9 10 11 12 13
      - id: isort
        files: .*.py
  - repo: https://github.com/psf/black
    rev: 19.10b0
    hooks:
      - id: black
        exclude: beat/core/test/prefix/algorithms/errors/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py
14
  - repo: https://github.com/pre-commit/pre-commit-hooks
15
    rev: v3.1.0
16
    hooks:
17 18 19
      - id: check-ast
        exclude: beat/core/test/prefix/algorithms/errors/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py
      - id: check-case-conflict
20 21 22
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: debug-statements
23
        exclude: beat/core/test/prefix/algorithms/errors/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py
24 25 26 27
      - id: check-added-large-files
      - id: check-docstring-first
      - id: check-yaml
        exclude: conda/meta.yaml
28 29 30 31
  - repo: https://github.com/PyCQA/flake8
    rev: 3.8.3
    hooks:
      - id: flake8
32
  - repo: https://github.com/PyCQA/bandit
33
    rev: 1.6.2
34 35
    hooks:
      - id: bandit
36
        exclude: beat/core/test/prefix/algorithms/errors/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
  - repo: local
    hooks:
      - id: sphinx-build
        name: sphinx build
        entry: python -m sphinx.cmd.build
        args: [-a, -E, -W, doc, sphinx]
        language: system
        files: ^doc/
        types: [file]
        pass_filenames: false
      - id: sphinx-doctest
        name: sphinx doctest
        entry: python -m sphinx.cmd.build
        args: [-a, -E, -b, doctest, doc, sphinx]
        language: system
        files: ^doc/
        types: [file]
        pass_filenames: false