Skip to content

Commit cc78c8b

Browse files
committed
switch pylint to pre-commit
1 parent a0381ad commit cc78c8b

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,14 @@ jobs:
4242
# (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
4343
run: |
4444
source actions-ci/install.sh
45-
- name: Pip install pylint, Sphinx, pre-commit
45+
- name: Pip install Sphinx, pre-commit
4646
run: |
47-
pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit sphinx-autoapi
47+
pip install --force-reinstall Sphinx sphinx-rtd-theme sphinx-autoapi pre-commit
4848
- name: Library version
4949
run: git describe --dirty --always --tags
5050
- name: Pre-commit hooks
5151
run: |
5252
pre-commit run --all-files
53-
- name: PyLint
54-
run: |
55-
pylint $( find . -path './jepler*.py' )
56-
([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" ))
5753
- name: Clone and build circuitpython unix port
5854
run: |
5955
set -e

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,16 @@ repos:
1717
- id: check-yaml
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
20+
- repo: https://github.com/pycqa/pylint
21+
rev: pylint-2.6.0
22+
hooks:
23+
- id: pylint
24+
name: lint (examples)
25+
types: [python]
26+
files: ^examples/
27+
args:
28+
- --disable=missing-docstring,invalid-name,bad-whitespace
29+
- id: pylint
30+
name: lint (code)
31+
types: [python]
32+
exclude: "^(docs/|examples/|setup.py$)"

0 commit comments

Comments
 (0)