Skip to content

Commit

Permalink
Add flake8 configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwu10 committed Apr 9, 2020
1 parent e644314 commit e044aec
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length = 80
select = C,E,F,W,B,B950
ignore = E203, E501, W503
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ repos:
rev: 19.10b0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.770
hooks:
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ POETRY ?= poetry
PYTHON ?= $(POETRY) run python

.PHONY: lint
lint: mypy black
lint: black flake8 mypy

.PHONY: test
test:
Expand All @@ -19,3 +19,7 @@ mypy:
.PHONY: black
black:
$(POETRY) run black .

.PHONY: flake8
flake8:
$(POETRY) run flake8 .
98 changes: 90 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pre-commit = { version = "^2.2.0", python = "^3.6.1" }
black = "^19.10b0"
pytest = "^5.4.1"
coverage = "^5.0.4"
flake8 = "^3.7.9"
flake8-bugbear = "^20.1.4"

[build-system]
requires = ["poetry>=0.12"]
Expand Down

0 comments on commit e044aec

Please sign in to comment.