Skip to content

Commit da8a4ff

Browse files
committed
feat: use ruff for formatting and linting
1 parent 0063c4f commit da8a4ff

File tree

3 files changed

+45
-9
lines changed

3 files changed

+45
-9
lines changed

.github/workflows/python.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Python lint and packages
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ master, dev ]
66
pull_request:
7-
branches: [ master ]
7+
branches: [ master, dev ]
88

99
jobs:
1010
build:
@@ -15,17 +15,15 @@ jobs:
1515
python-version: [ 3.9, "3.10", "3.11" ]
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919

2020
- name: Set up Python ${{ matrix.python-version }}
2121
uses: actions/setup-python@v2
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

25-
- name: Install dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
python setup.py install
25+
- uses: astral-sh/ruff-action@v3
2926

30-
- name: Black Code Formatter
31-
uses: jpetrucciani/black-check@22.12.0
27+
- uses: astral-sh/ruff-action@v3
28+
with:
29+
args: "format --check --diff"

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ build-backend = "uv_build"
4141
[tool.uv.build-backend]
4242
module-name = "dingz"
4343
module-root = ""
44+
45+
[dependency-groups]
46+
dev = [
47+
"ruff>=0.12.8",
48+
]

uv.lock

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)