Skip to content

Commit

Permalink
pyln: Ignore generated files when linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Jul 13, 2022
1 parent a93870a commit 1aa273f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ endif
PYTEST_OPTS := -v -p no:logging $(PYTEST_OPTS)
MY_CHECK_PYTHONPATH=$${PYTHONPATH}$${PYTHONPATH:+:}$(shell pwd)/contrib/pyln-client:$(shell pwd)/contrib/pyln-testing:$(shell pwd)/contrib/pyln-proto/:$(shell pwd)/external/lnprototest:$(shell pwd)/contrib/pyln-spec/bolt1:$(shell pwd)/contrib/pyln-spec/bolt2:$(shell pwd)/contrib/pyln-spec/bolt4:$(shell pwd)/contrib/pyln-spec/bolt7
# Collect generated python files to be excluded from lint checks
PYTHON_GENERATED=
PYTHON_GENERATED= \
contrib/pyln-testing/pyln/testing/primitives_pb2_grpc.py \
contrib/pyln-testing/pyln/testing/primitives_pb2.py \
contrib/pyln-testing/pyln/testing/node_pb2_grpc.py \
contrib/pyln-testing/pyln/testing/node_pb2.py \
contrib/pyln-testing/pyln/testing/grpc2py.py

# Options to pass to cppcheck. Mostly used to exclude files that are
# generated with external tools that we don't have control over
Expand Down
2 changes: 1 addition & 1 deletion contrib/pyln-testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ check: check-source check-pytest
check-source: check-flake8 check-mypy

check-flake8:
flake8 --ignore=E501,E731,W503,E741 pyln tests
flake8 --ignore=E501,E731,W503,E741 --exclude '*_pb2*.py,grpc2py.py' pyln tests

check-pytest:
pytest tests
Expand Down

0 comments on commit 1aa273f

Please sign in to comment.