Unverified Commit 2330c4f4 authored by Kai Chen's avatar Kai Chen Committed by GitHub
Browse files

Add pre-commit hooks (#156)

* add pre-commit hooks

* update yapf version
parent fd3f862e
repos:
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.3
hooks:
- id: seed-isort-config
# - repo: https://github.com/pre-commit/mirrors-isort
# rev: v4.3.21
# hooks:
# - id: isort
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.29.0
hooks:
- id: yapf
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: flake8
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- id: requirements-txt-fixer
......@@ -15,8 +15,8 @@ split_before_expression_after_opening_paren = true
[isort]
line_length = 79
multi_line_output = 0
known_standard_library = setuptools
known_standard_library = pkg_resources,setuptools
known_first_party = mmcv
known_third_party = addict,cv2,matplotlib,numpy,requests,six,torch,yaml
known_third_party = Cython,addict,cv2,mock,numpy,pytest,requests,resnet_cifar,six,terminaltables,torch,torchvision,yaml
no_lines_before = STDLIB,LOCALFOLDER
default_section = THIRDPARTY
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