Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
88 lines (77 loc) · 2.94 KB
/
Copy pathpyproject.toml
File metadata and controls
88 lines (77 loc) · 2.94 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
87
88
[project]
name = "contextmine"
version = "0.1.0"
description = "Open-source local Context7 alternative with MCP retrieval"
readme = "README.md"
requires-python = ">=3.14,<3.15"
dependencies = []
[dependency-groups]
dev = [
"ruff>=0.16.5",
"ty>=0.0.77",
"pytest>=9.1.1",
"pytest-cov>=7.1.0",
"anyio[trio]>=4.14.2",
"httpx>=0.28.1",
"pre-commit>=4.6.2",
"grpcio-tools>=1.83.1",
]
[tool.uv.workspace]
members = ["apps/api", "apps/worker", "packages/*"]
[tool.uv.sources]
contextmine-core = { workspace = true }
contextmine-worker = { workspace = true }
[tool.uv] # nosemgrep: package_managers.uv.uv-missing-dependency-cooldown.uv-missing-dependency-cooldown
# A global dependency cooldown would force an unrelated full-workspace re-lock.
# Keep this narrowly scoped dependency pinned by immutable commit and lockfile;
# introduce the cooldown with the next controlled workspace dependency refresh.
# multilspy's v0.1.0 release metadata still pins requests==2.32.3. Keep the
# workspace on the current patched requests release while exercising the
# compatibility in the real LSP smoke gate.
override-dependencies = ["requests>=2.34.2"]
[tool.ruff]
line-length = 100
target-version = "py314"
exclude = ["*_pb2.py", "*_pb2.pyi"]
# Ruff 0.16 added Markdown code-block formatting. Keep the repository's existing
# Python scope instead of rewriting unrelated documentation during this upgrade.
extend-exclude = ["*.md"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
ignore = ["E501"]
[tool.ty.environment]
python-version = "3.14"
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
]