mirror of
https://github.com/licsber/micropython.git
synced 2024-09-20 09:00:23 +08:00
303ccca7c6
- 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>
12 lines
371 B
YAML
12 lines
371 B
YAML
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
name: Python code lint and formatting with ruff
|
|
on: [push, pull_request]
|
|
jobs:
|
|
ruff:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: pip install --user ruff==0.1.3
|
|
- run: ruff check --output-format=github .
|
|
- run: ruff format --diff .
|