Adding pre-commit package to yml, more rules to flake8 lint config and adding pre-commit config file

This commit is contained in:
Richin Jain 2019-03-13 14:21:15 -04:00
Родитель e5ea89263e
Коммит 37b2bd098c
3 изменённых файлов: 22 добавлений и 3 удалений

14
.flake8
Просмотреть файл

@ -1,4 +1,12 @@
[flake8]
ignore =
# something may be undefined, or defined from a star import
F405
# Intial set of rules
# Feel Free to add any new rule here with description of what it does.
# E203 Whitespace before ':'
# E266 Too many leading '#' for block comment
# E501 Line too long (82 > 79 characters)
# W503 Line break occurred before a binary operator
# F403 'from module import *' used; unable to detect undefined names
ignore = E203, E266, E501, W503, F403
max-line-length = 79

10
.pre-commit-config.yaml Normal file
Просмотреть файл

@ -0,0 +1,10 @@
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.6
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
hooks:
- id: flake8

Просмотреть файл

@ -42,3 +42,4 @@ dependencies:
- pillow
- ipywebrtc
- pytest
- pre-commit>=1.14.4