Skip to content

Commit

Permalink
test/run: Call ruff on Python executables
Browse files Browse the repository at this point in the history
This spotted all errors fixed in the previous commits.
  • Loading branch information
martinpitt authored and jelly committed Jul 19, 2023
1 parent b320741 commit 6004c45
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/run
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
#!/bin/sh

set -eu

PYEXEFILES="$(git grep -lI '^#!.*python') $(git ls-files "*.py")"

test_ruff() {
command -v ruff >/dev/null || { echo 'no ruff installed'; return 0; }
test -n "$(ruff check --show-files .)" || return 0 # no python changes
ruff check --no-cache .
ruff check --no-cache . $PYEXEFILES
}

test_ruff

# run static code checks like pyflakes and pep8
PYEXEFILES="$(git grep -lI '^#!.*python') $(git ls-files "*.py")"
flake8 $PYEXEFILES

./test-bots

0 comments on commit 6004c45

Please sign in to comment.