Skip to content

Commit

Permalink
feat: Add static checking
Browse files Browse the repository at this point in the history
- Add pylint, flake8, black
- Update requirements
- Refs: #9
  • Loading branch information
soeque1 committed Feb 13, 2021
1 parent 39b1108 commit 0c83bf7
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is an example .flake8 config, used when developing *Black* itself.
# Keep in sync with setup.cfg which is used for source packages.

[flake8]
max-line-length = 99
extend-ignore = E203, W503
7 changes: 7 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[settings]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
combine_as_imports=True
line_length=99
force_sort_within_sections=True
3 changes: 3 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[MASTER]
disable = C0330, C0326
max-line-lengt = 99
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
format:
isort . --sp .isort.cfg --skip data --skip Dockerfile
black . -l 99

lint:
find . -iname "*.py" | xargs pylint --rcfile=.pylintrc || exit 0

lint-report:
find . -iname "*.py" | xargs pytest --pylint --pylint-rcfile=.pylintrc --flake8 || exit 0

typehint:
find . -iname "*.py" | xargs mypy --ignore-missing-imports --show-error-codes --pretty --strict || exit 0
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
black
flake8
isort
tokenizers
konlpy
mypy
pylint
PyYAML
pytest
pytest-flake8
pytest-pylint

0 comments on commit 0c83bf7

Please sign in to comment.