-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
86 lines (79 loc) · 2.33 KB
/
pyproject.toml
File metadata and controls
86 lines (79 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
[build-system]
requires = ["hatchling>=1.18.0"]
build-backend = "hatchling.build"
[project]
name = "extralit-hf-space"
version = "0.1.0"
description = "Extralit HuggingFace Space with Elasticsearch and Redis"
license = {text = "AGPL-3.0-or-later"}
requires-python = ">=3.10"
dependencies = [
"rq",
"redis",
"httpx",
"honcho~=2.0.0",
"pymupdf4llm~=0.0.27",
]
[tool.hatch.build.targets.wheel]
packages = ["extralit_ocr"]
[dependency-groups]
dev = [
"ruff",
"rq-dashboard",
]
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
select = [
"F", # Pyflakes (undefined names, logical issues)
"E7", # Syntax/indentation errors
"E9", # Runtime-like errors
"E4", # Import-related errors (E401, E402, etc.)
"B012", # return in finally (can suppress real exceptions)
"B", # flake8-bugbear (broader than just B012)
"C4", # flake8-comprehensions
"I", # isort (import sorting)
"UP", # pyupgrade (modern Python syntax)
"ASYNC", # flake8-async - async/await specific rules
"PLE", # pylint errors (includes await-outside-async)
"FAST", # FastAPI-specific rules (valuable for your backend)
"RUF", # ruff-specific rules
]
ignore = [
"E402", # imports not at top (lazy / optional import patterns)
"B904", # exception chaining (will phase in later)
"UP007", # | union syntax modernization
"UP045", # Optional[...] -> X | None modernization
"UP017", # datetime.timezone.utc -> datetime.UTC
"B027", # empty abstract method not marked abstract
"B024", # abstract base class without abstract methods
"B017", # broad exception asserts in tests
"RUF012", # mutable class var typing inference
"B008", # FastAPI Depends pattern
"FAST002" # FastAPI Depends suggestion
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403", "I001"] # Ignore unused imports and wildcard imports in __init__.py
"tests/*.py" = ["ASYNC", "F821", "F401"] # More lenient async rules in tests (ignore undefined names like forward refs/fixtures)