Skip to content

Commit

Permalink
[pylint] add pylint dev routine
Browse files Browse the repository at this point in the history
 - pre-commit
 - CI
  • Loading branch information
spalmer25 committed Oct 31, 2024
1 parent 89c2577 commit 755bcfc
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/coding_style_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,20 @@ jobs:
source: './app/src'
extensions: 'h,c'
version: 15

pylint_check:
name: Python Lint Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install pylint
run: pip install pylint -r tests/requirements.txt

- name: Run pylint with .pylintrc
run: pylint --errors-only --rcfile=tests/integration/.pylintrc tests/integration/nano/
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
python-version: '3.10'
- run: python -m pip install pre-commit
- run: python -m pip freeze --local
- run: SKIP=clang-format pre-commit run --all-files
- run: SKIP=clang-format,pylint pre-commit run --all-files
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ repos:
language: system
files: ^
types: [file, c]

- id: pylint
name: pylint
description: Run pylint with custom .pylintrc configuration
entry: pylint
language: system
pass_filenames: false
args: ["--errors-only", "--rcfile=tests/integration/.pylintrc", "tests/integration/nano/"]
types: [python]
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ base58
pytezos
GitPython
pytest-xdist
ragger[tests,speculos,ledgerwallet]

0 comments on commit 755bcfc

Please sign in to comment.