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.
This commit is contained in:
Jeff Epler 2023-02-09 10:02:34 -06:00
parent 88e0aa6f8e
commit 541f533143
No known key found for this signature in database
GPG key ID: D5BF15AB975AB4DE
2 changed files with 12 additions and 1 deletions

View file

@ -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
```

View file

@ -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