Browse Source
masterab439617f3Add flake8 linter script (Kristaps Kaupe)512fab735aFix remaining flake8 errors (Kristaps Kaupe) Pull request description: Top commit has no ACKs. Tree-SHA512: 73cd6e308dbe8f387eaf4203a35778aa22fc229231cb6624f66c1412a4041a20ecc4b842b0ad411fcd018002486b9c6016a4f2ae0c95c9480478ca6f5d8b878d
6 changed files with 22 additions and 4 deletions
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash |
||||
# Based on Bitcoin Core's test/lint/lint-python.sh |
||||
|
||||
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 |
||||
flake8 $(git ls-files "*.py") |
||||
else |
||||
flake8 "$@" |
||||
fi |
||||
Loading…
Reference in new issue