Skip to content

Commit

Permalink
Merge #1569: Fix Python lint script
Browse files Browse the repository at this point in the history
bfd5b21 fix linting (roshii)

Pull request description:

  - Fixes #1568
  - Remove Python 2 check
  - Use script in CI

ACKs for top commit:
  kristapsk:
    ACK bfd5b21

Tree-SHA512: aec12cc7aa03ac82979186bd146603462f11742746c8e5f2eb78f424e83740bfc59678fba0a5b2bc7d0f3dde38a1a9d4b6ceabb280a301be423b2c1fdb4a2e41
  • Loading branch information
kristapsk committed Oct 6, 2023
2 parents 28c8413 + bfd5b21 commit 4a1659a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 1 addition & 4 deletions test/lint/lint-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4a1659a

Please sign in to comment.