From 541f53314378f1c54fef9b4bed3cebc047b2e98c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 9 Feb 2023 10:02:34 -0600 Subject: [PATCH] Use pylint-learn as the pylint version, if installed .. this allows a user to install the specific version of pylint required, under the specific name: ``` pipx install --suffix -learn pylint==2.7.1 ``` and run pylint_check more easily locally. --- README.md | 11 +++++++++++ pylint_check.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0bd0b6793..22c12fdb2 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,14 @@ This is a work in progress. [learn]: https://learn.adafruit.com/ +## Running pylint locally +Install a specific version of pylint under the name "pylint-learn": +``` +pip instal pipx +pipx install --suffix -learn pylint==2.7.1 +``` +Then use the `pylint_check` script to run pylint on the files or directories +of your choice: +``` +./pylint_check CircuitPython_Cool_Project +``` diff --git a/pylint_check.sh b/pylint_check.sh index 119742c55..8ba61a8fb 100755 --- a/pylint_check.sh +++ b/pylint_check.sh @@ -1,6 +1,6 @@ #!/bin/bash -PYLINT="`type -p pylint3 2>/dev/null || type -p pylint`" +PYLINT="`type -p pylint-learn 2>/dev/null || type -p pylint3 2>/dev/null || type -p pylint`" echo "Using pylint bin at $PYLINT" # Use * as the default argument to avoid descending into hidden directories like .git