Skip to content

Commit b689b75

Browse files
committed
use ruff instead of pylint and black
1 parent 617fff7 commit b689b75

33 files changed

+270
-687
lines changed

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-FileCopyrightText: 2024 Justin Myers for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
5+
* text eol=lf

.pre-commit-config.yaml

+11-31
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,22 @@
11
# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò
2+
# SPDX-FileCopyrightText: 2024 Justin Myers
23
#
34
# SPDX-License-Identifier: Unlicense
45

56
repos:
6-
- repo: https://github.com/python/black
7-
rev: 24.2.0
8-
hooks:
9-
- id: black
10-
- repo: https://github.com/fsfe/reuse-tool
11-
rev: v1.1.2
12-
hooks:
13-
- id: reuse
147
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v4.4.0
8+
rev: v4.5.0
169
hooks:
1710
- id: check-yaml
1811
- id: end-of-file-fixer
1912
- id: trailing-whitespace
20-
- repo: https://github.com/pycqa/pylint
21-
rev: v2.17.4
13+
- repo: https://github.com/astral-sh/ruff-pre-commit
14+
rev: v0.3.4
2215
hooks:
23-
- id: pylint
24-
name: pylint (library code)
25-
types: [python]
26-
args:
27-
- --disable=consider-using-f-string
28-
exclude: "^(docs/|examples/|tests/|setup.py$)"
29-
- id: pylint
30-
name: pylint (example code)
31-
description: Run pylint rules on "examples/*.py" files
32-
types: [python]
33-
files: "^examples/"
34-
args:
35-
- --disable=consider-using-f-string,duplicate-code,missing-docstring,invalid-name
36-
- id: pylint
37-
name: pylint (test code)
38-
description: Run pylint rules on "tests/*.py" files
39-
types: [python]
40-
files: "^tests/"
41-
args:
42-
- --disable=consider-using-f-string,duplicate-code,missing-docstring,invalid-name,protected-access
16+
- id: ruff-format
17+
- id: ruff
18+
args: ["--fix"]
19+
- repo: https://github.com/fsfe/reuse-tool
20+
rev: v3.0.1
21+
hooks:
22+
- id: reuse

0 commit comments

Comments
 (0)