diff --git a/.flake8 b/.flake8 index f7ce9d7..f836d49 100644 --- a/.flake8 +++ b/.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 \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..5cb831e --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 \ No newline at end of file diff --git a/image_classification/environment.yml b/image_classification/environment.yml index e388684..0b055a4 100644 --- a/image_classification/environment.yml +++ b/image_classification/environment.yml @@ -42,3 +42,4 @@ dependencies: - pillow - ipywebrtc - pytest + - pre-commit>=1.14.4