Skip to content

Commit

Permalink
add black and flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Jun 17, 2020
1 parent be90621 commit 297bc83
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:

# black: Python Formatter
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3.7

# flake8: Python PEP8 Compliance
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
additional_dependencies: [
'flake8-bugbear==20.1.4'
]
args: [--config=setup.cfg]

# General Text + YAML Lint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
Expand Down
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[flake8]
per-file-ignores =
test/conftest.py:B950
max-line-length = 80
select = C,E,F,W,B,B950
ignore =
# Use bugbear line length detection instead of default
E501,
E203,
W503

0 comments on commit 297bc83

Please sign in to comment.