mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
use ruff instead of black (#598)
This commit is contained in:
parent
e77672200b
commit
2eca765533
11 changed files with 40 additions and 73 deletions
21
.github/workflows/docs.yaml
vendored
21
.github/workflows/docs.yaml
vendored
|
|
@ -10,22 +10,25 @@ jobs:
|
|||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
architecture: 'x64'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
architecture: 'x64'
|
||||
cache: "pip"
|
||||
cache-dependency-path: |
|
||||
requirements.txt
|
||||
docs/requirements.txt
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
make cython
|
||||
|
||||
- name: Sphinx Documentation Generator
|
||||
run: |
|
||||
pip install tox
|
||||
tox -e sphinx
|
||||
pip install -r docs/requirements.txt
|
||||
make docs
|
||||
|
|
|
|||
|
|
@ -1,25 +1,22 @@
|
|||
name: Black
|
||||
name: lint
|
||||
|
||||
on: ["push", "pull_request"]
|
||||
|
||||
jobs:
|
||||
black:
|
||||
lint:
|
||||
# We want to run on external PRs, but not on our own internal PRs as they'll be run
|
||||
# by the push to the branch.
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
architecture: 'x64'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Black Code Formatter
|
||||
- name: ruff check
|
||||
run: |
|
||||
pip install black==22.3.0
|
||||
black -S --diff --check msgpack/ test/ setup.py
|
||||
pipx run ruff check --diff msgpack/ test/ setup.py
|
||||
|
||||
- name: ruff format
|
||||
run: |
|
||||
pipx run ruff format --diff msgpack/ test/ setup.py
|
||||
Loading…
Add table
Add a link
Reference in a new issue