-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
81 lines (71 loc) · 2.27 KB
/
pyproject.toml
File metadata and controls
81 lines (71 loc) · 2.27 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
[project]
name = "contextmine"
version = "0.1.0"
description = "Open-source local Context7 alternative with MCP retrieval"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"igraph>=1.0.0",
"leidenalg>=0.11.0",
]
[dependency-groups]
dev = [
"ruff>=0.8.0",
"ty>=0.0.1a1",
"pytest>=8.0.0",
"pytest-cov>=6.0.0",
"anyio[trio]>=4.0.0",
"pytest-anyio>=0.0.0",
"httpx>=0.28.0",
"pre-commit>=4.0.0",
"grpcio-tools>=1.76.0",
]
[tool.uv.workspace]
members = ["apps/api", "apps/worker", "packages/*"]
[tool.uv.sources]
contextmine-core = { workspace = true }
contextmine-worker = { workspace = true }
[tool.ruff]
line-length = 100
target-version = "py312"
exclude = ["*_pb2.py", "*_pb2.pyi"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
ignore = ["E501"]
[tool.ty.environment]
python-version = "3.12"
python = ".venv"
extra-paths = []
[tool.ty.src]
exclude = ["vulture_whitelist.py", "*_pb2.py", "*_pb2.pyi", "**/proto/*"]
[tool.ty.rules]
# Ignore false positives from library stubs (Starlette, Prefect, Anthropic)
invalid-argument-type = "ignore"
no-matching-overload = "ignore"
# Test mocking patterns trigger this
invalid-assignment = "ignore"
# Optional attribute access in tests
possibly-missing-attribute = "ignore"
# Optional dependencies (multilspy, etc.) may not be installed
unresolved-import = "ignore"
# Test code uses `in` operator with Optional types
unsupported-operator = "ignore"
# SQLAlchemy async session patterns: ty can't resolve async through re-exports
invalid-await = "ignore"
# Test stubs with simplified return types
invalid-return-type = "ignore"
# SQLAlchemy Result.rowcount and gitpython diff types not in stubs
unresolved-attribute = "ignore"
[tool.pytest.ini_options]
testpaths = ["apps/api/tests", "apps/worker/tests", "packages/core/tests"]
[tool.bandit]
exclude_dirs = ["tests", ".venv", "node_modules"]
skips = [
"B101", # assert warnings (used in tests)
"B104", # 0.0.0.0 bind (intentional for containers)
"B105", # hardcoded password false positives on URLs
"B110", # try/except/pass (intentional fallbacks)
"B404", # subprocess import (needed for spider-md binary)
"B603", # subprocess without shell (spider-md binary)
"B608", # SQL injection false positive on prompt templates
]