mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Add pre commit (#103)
* add pre-commit * run pre-commit * skip lint on README.md as it breaks template filling
This commit is contained in:
17
tox.ini
17
tox.ini
@ -1,7 +1,7 @@
|
||||
[tox]
|
||||
envlist=
|
||||
py{37,38,39,310,311}-core
|
||||
py{37,38,39,310,311}-lint
|
||||
py{38,39,310,311}-lint
|
||||
py{37,38,39,310,311}-wheel
|
||||
py311-wheel-windows
|
||||
docs
|
||||
@ -36,26 +36,19 @@ basepython=
|
||||
extras=
|
||||
test
|
||||
docs
|
||||
allowlist_externals=make
|
||||
allowlist_externals=make,pre-commit
|
||||
|
||||
[common-lint]
|
||||
basepython=python
|
||||
extras=lint
|
||||
allowlist_externals=black
|
||||
deps=pre-commit
|
||||
commands=
|
||||
mypy -p <MODULE_NAME> --config-file {toxinidir}/mypy.ini
|
||||
flake8 {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
||||
isort --check-only --diff {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
||||
pydocstyle --explain {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
||||
black --check {toxinidir}/<MODULE_NAME> {toxinidir}/docs {toxinidir}/tests {toxinidir}/setup.py
|
||||
pre-commit run --all-files --show-diff-on-failure
|
||||
|
||||
[testenv:lint]
|
||||
basepython: python
|
||||
extras: {[common-lint]extras}
|
||||
commands: {[common-lint]commands}
|
||||
|
||||
[testenv:py{37,38,39,310,311}-lint]
|
||||
extras: {[common-lint]extras}
|
||||
[testenv:py{38,39,310,311}-lint]
|
||||
commands: {[common-lint]commands}
|
||||
|
||||
[testenv:py{37,38,39,310,311}-wheel]
|
||||
|
||||
Reference in New Issue
Block a user