Browse Source

Merge JoinMarket-Org/joinmarket-clientserver#1569: Fix Python lint script

bfd5b2146c fix linting (roshii)

Pull request description:

  - Fixes https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1568
  - Remove Python 2 check
  - Use script in CI

ACKs for top commit:
  kristapsk:
    ACK bfd5b2146c

Tree-SHA512: aec12cc7aa03ac82979186bd146603462f11742746c8e5f2eb78f424e83740bfc59678fba0a5b2bc7d0f3dde38a1a9d4b6ceabb280a301be423b2c1fdb4a2e41
master
Kristaps Kaupe 2 years ago
parent
commit
4a1659a3d3
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  1. 2
      .github/workflows/unittests.yml
  2. 5
      test/lint/lint-python.sh

2
.github/workflows/unittests.yml

@ -32,7 +32,7 @@ jobs:
./install.sh --develop --with-qt
./jmvenv/bin/python -m pip install --upgrade pip
- name: Lint with flake8
run: ./jmvenv/bin/flake8 -v src
run: source ./jmvenv/bin/activate && ./test/lint/lint-python.sh
- name: Cache bitcoind
uses: actions/cache@v3
env:

5
test/lint/lint-python.sh

@ -2,14 +2,11 @@
# Based on Bitcoin Core's test/lint/lint-python.sh
# The python files in jmqtui/jmqtui are auto generated.
EXCLUDE_PATTERNS="jmqtui/jmqtui/*.py"
EXCLUDE_PATTERNS="src/jmqtui/*.py"
if ! command -v flake8 > /dev/null; then
echo "Skipping Python linting since flake8 is not installed."
exit 0
elif flake8 --version | grep -q "Python 2"; then
echo "Skipping Python linting since flake8 is running under Python 2. Install the Python 3 version of flake8."
exit 0
fi
if [[ $# == 0 ]]; then

Loading…
Cancel
Save