mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Skip pb files in linters
In isort, black, and flake8, respectively. Add `format` in Makefile Run top level packages only With `setup.py`, to avoid running other unrelated directories. Refactor
This commit is contained in:
committed by
Kevin Mai-Husan Chia
parent
c8005c8113
commit
4fef80595c
11
Makefile
11
Makefile
@ -1,8 +1,15 @@
|
||||
FILES_TO_LINT = libp2p tests examples setup.py
|
||||
|
||||
format:
|
||||
black $(FILES_TO_LINT)
|
||||
isort --recursive $(FILES_TO_LINT)
|
||||
|
||||
lintroll:
|
||||
# NOTE: disabling `mypy` until we get typing sorted in this repo
|
||||
# mypy -p libp2p -p examples --config-file {toxinidir}/mypy.ini
|
||||
black --check examples libp2p/__init__.py libp2p/host libp2p/kademlia libp2p/network libp2p/peer libp2p/protocol_muxer libp2p/pubsub/*.py libp2p/routing libp2p/security libp2p/stream_muxer libp2p/transport tests setup.py
|
||||
isort --recursive --check-only examples libp2p/__init__.py libp2p/host libp2p/kademlia libp2p/network libp2p/peer libp2p/protocol_muxer libp2p/pubsub/*.py libp2p/routing libp2p/security libp2p/stream_muxer libp2p/transport tests setup.py
|
||||
# TODO: add flake8
|
||||
black --check $(FILES_TO_LINT)
|
||||
isort --recursive --check-only $(FILES_TO_LINT)
|
||||
|
||||
protobufs:
|
||||
cd libp2p/pubsub/pb && protoc --python_out=. rpc.proto
|
||||
|
||||
Reference in New Issue
Block a user