GitHub Action for Python code check
Pythonのコードチェック用のGitHub Action
- black
- flake8
- mypy
- isort
このActionでは上記4点が評価されます。
Write .github/workflows/main.yml
.
使用するには.github/workflows/main.yml
に追記してください。
- name: GitHub Action for Python code check
uses: nanato12/pychecker@master
with:
path: './'
Refer to this: main.yml
こちらを参考に: main.yml
Write the options for each check to setup.cfg
.
各チェックのオプションはsetup.cfg
に記載してください。
If setup.cfg
does not exist, each check will conflict.
もし、setup.cfg
が存在しない場合、各チェックは競合し失敗します。
Recommended:
おすすめ:
[flake8]
extend-ignore = E203, E501
exclude = __init__.py
[isort]
multi_line_output=3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
ensure_newline_before_comments = True
line_length = 88
[mypy]
disallow_untyped_calls = True
disallow_untyped_defs = True
docker build . -t pychecker
docker run --workdir /workspace -v $PWD:/workspace pychecker /workspace