mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
I don't want to ever have to sort imports again. It's a poor use of developer time. Automate this with a pre-commit hook, and check this on CI. Developers: I suggest you configure your editor to use `reorder_python_imports`. It uses the standard sorting, and detects first/third party libs well.
29 lines
924 B
YAML
29 lines
924 B
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v2.4.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
args: [--markdown-linebreak-ext=md]
|
|
- id: end-of-file-fixer
|
|
exclude: '.travis.yml'
|
|
- id: check-toml
|
|
- id: check-added-large-files
|
|
- id: debug-statements
|
|
- repo: https://gitlab.com/pycqa/flake8
|
|
rev: "master" # pick a git hash / tag to point to
|
|
hooks:
|
|
- id: flake8
|
|
additional_dependencies: [flake8-import-order, flake8-bugbear]
|
|
- repo: https://github.com/asottile/reorder_python_imports
|
|
rev: v2.3.0
|
|
hooks:
|
|
- id: reorder-python-imports
|
|
- repo: local
|
|
hooks:
|
|
- id: update-travis
|
|
name: Update travis job definition
|
|
description: Ensures that travis job definition are up to date.
|
|
entry: scripts/make_travisconf.py
|
|
files: '.*travis.*'
|
|
stages: [commit]
|
|
language: script
|