Skip to content

Commit

Permalink
switch from pylint to ruff (#8)
Browse files Browse the repository at this point in the history
* switch from pylint to ruff

update pre-commit hooks as well

* use python 3.11 to build cirpy bundles

until circuitpython-build-tools replaces use of pkg_resources
  • Loading branch information
2bndy5 authored Dec 11, 2023
1 parent 10e107c commit 1ef2ecc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: "3.x"
python-version: "3.11"

- name: Checkout tools repo
uses: actions/checkout@v4
Expand Down
25 changes: 6 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,20 @@
repos:
- repo: https://github.com/python/black
rev: 23.1.0
rev: 23.11.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/pylint
rev: v2.17.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
hooks:
- id: pylint
name: pylint (library code)
types: [python]
args:
- --disable=consider-using-f-string,duplicate-code,too-many-public-methods,too-few-public-methods
exclude: "^(docs/|examples/|tests/|setup.py$)"
additional_dependencies: ["adafruit-circuitpython-busdevice"]
- id: pylint
name: pylint (example code)
description: Run pylint rules on "examples/*.py" files
types: [python]
files: "^examples/"
args:
- --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code,import-error,unused-import
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
rev: v1.7.1
hooks:
- id: mypy
name: mypy (library code)
Expand Down

0 comments on commit 1ef2ecc

Please sign in to comment.