summaryrefslogtreecommitdiffstatshomepage
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2023-10-21 17:40:27 +1100
committerDamien George <damien@micropython.org>2023-11-03 13:30:38 +1100
commit303ccca7c62bd48b9f6a519549caf0d0f3d2624e (patch)
tree3957164f749abc13527add3647afd3439c50a04e /.pre-commit-config.yaml
parent7ad84e0422a521fe97ce5d742df280c6b8a3ff87 (diff)
downloadmicropython-303ccca7c62bd48b9f6a519549caf0d0f3d2624e.tar.gz
micropython-303ccca7c62bd48b9f6a519549caf0d0f3d2624e.zip
all: Replace "black" with "ruff format".
- Add config for [tool.ruff.format] to pyproject.toml. - Update pre-commit to run both ruff and ruff-format (and only check C files when running codeformat.py) - Update CI. - Simplify codeformat.py to remove all the Python-specific logic (just run "ruff format" directly). This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml7
1 files changed, 4 insertions, 3 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bfce6a2468..3004bc5677 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -2,8 +2,8 @@ repos:
- repo: local
hooks:
- id: codeformat
- name: MicroPython codeformat.py for changed files
- entry: tools/codeformat.py -v -f
+ name: MicroPython codeformat.py for changed C files
+ entry: tools/codeformat.py -v -c -f
language: python
- id: verifygitlog
name: MicroPython git commit message format checker
@@ -12,6 +12,7 @@ repos:
verbose: true
stages: [commit-msg]
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: v0.1.0
+ rev: v0.1.3
hooks:
- id: ruff
+ - id: ruff-format