Commit 52245542 authored by Samuel GAIST's avatar Samuel GAIST

[pre-commit] Update configurations

- Add isort
- Update black repository reference
- Add ast check and case conflict check

Update flake8 configuration for line
length to match the one from black.
parent ec4b99bc
[flake8] [flake8]
max-line-length = 80 max-line-length = 88
select = B,C,E,F,W,T4,B9,B950 select = B,C,E,F,W,T4,B9,B950
ignore = E501, W503 ignore = E501, W503, E203
[settings]
line_length=88
order_by_type=true
lines_between_types=1
# See https://pre-commit.com for more information # See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks # See https://pre-commit.com/hooks.html for more hooks
repos: repos:
- repo: https://github.com/ambv/black - repo: https://github.com/timothycrosley/isort
rev: 4.3.21-2
hooks:
- id: isort
args: [-sl]
- repo: https://github.com/psf/black
rev: stable rev: stable
hooks: hooks:
- id: black - id: black
language_version: python3.6 exclude: beat/backend/python/test/prefix/.*/syntax_error
exclude: beat/core/test/prefix/algorithms/user/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0 rev: v2.0.0
hooks: hooks:
- id: check-ast
exclude: beat/backend/python/test/prefix/.*/syntax_error
- id: check-case-conflict
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: debug-statements - id: debug-statements
exclude: beat/core/test/prefix/algorithms/user/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py exclude: beat/backend/python/test/prefix/.*/syntax_error
- id: check-added-large-files - id: check-added-large-files
- id: check-docstring-first - id: check-docstring-first
- id: flake8 - id: flake8
exclude: beat/backend/python/test/prefix/.*/(.*crash|syntax_error)
- id: check-yaml - id: check-yaml
exclude: conda/meta.yaml exclude: conda/meta.yaml
- repo: https://github.com/PyCQA/bandit - repo: https://github.com/PyCQA/bandit
rev: 'master' # Update me! rev: 'master' # Update me!
hooks: hooks:
- id: bandit - id: bandit
exclude: beat/editor/test|beat/core/test/prefix/algorithms/user/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py exclude: beat/backend/python/test/prefix/.*/syntax_error
- repo: local - repo: local
hooks: hooks:
- id: sphinx-build - id: sphinx-build
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment