Charles Azam commited on
Commit
2f9ac5c
·
1 Parent(s): 2e72e18

feat: use black as formatter

Browse files
.github/workflows/pipeline.yml CHANGED
@@ -23,6 +23,9 @@ jobs:
23
  - name: Install the project
24
  run: uv sync --locked --all-extras --dev
25
 
 
 
 
26
  - name: Run tests
27
  run: uv run pytest tests
28
  env:
 
23
  - name: Install the project
24
  run: uv sync --locked --all-extras --dev
25
 
26
+ - name: Run formatter check
27
+ run: uv run black --check src tests
28
+
29
  - name: Run tests
30
  run: uv run pytest tests
31
  env:
.pre-commit-config.yaml CHANGED
@@ -1,7 +1,6 @@
1
  repos:
2
- - repo: https://github.com/astral-sh/ruff-pre-commit
3
- rev: v0.2.0
4
  hooks:
5
- - id: ruff
6
- args: [--fix, --exit-non-zero-on-fix]
7
- - id: ruff-format
 
1
  repos:
2
+ - repo: https://github.com/psf/black
3
+ rev: 25.1.0
4
  hooks:
5
+ - id: black
6
+ language_version: python3.13
 
Makefile DELETED
@@ -1,28 +0,0 @@
1
- .PHONY: help format lint type-check check install-dev install-pre-commit
2
-
3
- help: ## Show this help message
4
- @echo "Available commands:"
5
- @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
6
-
7
- install-dev: ## Install development dependencies
8
- uv sync --all-extras --dev
9
-
10
- install-pre-commit: ## Install pre-commit hooks
11
- uv run pre-commit install
12
-
13
- format: ## Format code with black
14
- uv run ruff format src tests
15
-
16
- lint: ## Run ruff linter
17
- uv run ruff check src tests
18
-
19
- lint-fix: ## Run ruff linter and auto-fix issues
20
- uv run ruff check --fix src tests
21
-
22
- check: format lint ## Run all checks (format, lint)
23
-
24
- test: ## Run tests
25
- uv run pytest tests
26
-
27
- test-cov: ## Run tests with coverage
28
- uv run pytest tests --cov=src --cov-report=html --cov-report=term-missing
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ *.pdf
pyproject.toml CHANGED
@@ -37,27 +37,3 @@ line-length = 88
37
  target-version = ['py312']
38
 
39
 
40
- [tool.ruff]
41
- target-version = "py312"
42
- line-length = 88
43
- lint.select = [
44
- "E", # pycodestyle errors
45
- "W", # pycodestyle warnings
46
- "F", # pyflakes
47
- "I", # isort
48
- "B", # flake8-bugbear
49
- "C4", # flake8-comprehensions
50
- "UP", # pyupgrade
51
- ]
52
- lint.ignore = [
53
- "E501", # line too long, handled by black
54
- "B008", # do not perform function calls in argument defaults
55
- "C901", # too complex
56
- ]
57
-
58
- [tool.ruff.format]
59
- quote-style = "double"
60
- indent-style = "space"
61
- skip-magic-trailing-comma = false
62
- line-ending = "auto"
63
-
 
37
  target-version = ['py312']
38
 
39