Skip to content

Commit a89e61e

Browse files
authored
feat: formatter and pre-commit (#2)
* chore: added formatter * feat: pre commit config
1 parent 438e2cb commit a89e61e

5 files changed

Lines changed: 249 additions & 133 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ runs:
1212
- name: Install deps
1313
shell: bash
1414
run: |
15-
uv sync --locked --all-extras --all-packages --all-groups
15+
uv sync --locked --active --all-extras --all-packages --all-groups
1616

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
- name: Deps check
2121
run: uv lock --check
2222

23+
- name: Format
24+
run: uv run ruff format
25+
2326
- name: Lint
2427
run: uv run ruff check --fix
2528

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: trailing-whitespace
7+
- repo: https://github.com/psf/black
8+
rev: 22.10.0
9+
hooks:
10+
- id: black

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dev = [
1717
"pytest>=8.3.5",
1818
"pytest-cov>=6.1.1",
1919
"httpx>=0.28.1",
20+
"pre-commit>=4.2.0",
2021
]
2122
lint = [
2223
"ruff>=0.11.6",
@@ -94,4 +95,3 @@ exclude = [
9495
[tool.ruff.format]
9596
quote-style = "double"
9697
indent-style = "space"
97-

0 commit comments

Comments
 (0)