-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
127 lines (115 loc) · 3.66 KB
/
pyproject.toml
File metadata and controls
127 lines (115 loc) · 3.66 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
[project]
name = "different-agent"
version = "0.1.0"
description = "Agentic tool to extract bug/vulnerability fixes from an inspiration repo and assess applicability to a target repo."
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"deepagents>=0.3.8",
"langchain-openai>=0.2.0",
"python-dotenv>=1.0.0",
]
[project.scripts]
different-agent = "different_agent.cli:main"
[build-system]
requires = ["uv_build>=0.9.26"]
build-backend = "uv_build"
[dependency-groups]
lint = [
"ruff>=0.14.14",
"ty>=0.0.13",
]
test = [
"pytest>=9.0.2",
"pytest-cov>=6.0",
]
dev = [
{ include-group = "lint" },
{ include-group = "test" },
]
[tool.uv]
default-groups = ["dev"]
[tool.ruff]
line-length = 100
target-version = "py311"
src = ["src"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D", # pydocstyle (docstrings)
"C901", # complexity warnings (refactor later)
"COM812", # missing trailing comma (conflicts with formatter)
"ISC001", # single-line implicit string concat (conflicts with formatter)
"TC", # type-checking imports (too strict for this project)
"TD002", # missing TODO author
"TD003", # missing TODO link
"FIX002", # line contains TODO
"TRY003", # long exception messages (too strict for CLI apps)
"EM101", # exception string literal (too strict)
"EM102", # exception f-string (too strict)
"ANN401", # Any type disallowed (sometimes necessary)
"PLR0915", # too many statements (refactor later)
"PLR0911", # too many return statements (acceptable for parsing)
"PLR0912", # too many branches (acceptable for parsing/CLI flows)
"PLR0913", # too many arguments (acceptable for tool APIs)
"PLR2004", # magic value comparison (too strict)
"PLC0415", # import not at top level (intentional for optional deps)
"PTH", # pathlib enforcement (would require full refactor)
"RUF001", # ambiguous unicode (en dash is intentional)
"PLW2901", # loop variable overwritten (common pattern)
"S310", # URL open audit (handled at call site)
"FBT", # boolean trap (acceptable for tool APIs)
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # assert allowed in tests
"S603", # subprocess call (test helper)
"PLR2004", # magic values allowed in tests
"ANN", # type annotations optional in tests
"INP001", # implicit namespace package
"SLF001", # private member access (tests cover internal helpers)
]
"src/different_agent/agents.py" = [
"E501", # long lines in prompt strings
]
"src/different_agent/report.py" = [
"E501", # long lines in HTML template
"PERF401", # for loop more readable than comprehension for HTML generation
]
"src/different_agent/git_tools.py" = [
"S603", # subprocess.run with trusted git commands
]
"src/different_agent/github_tools.py" = [
"BLE001", # broad exceptions for robust API wrappers
]
"src/different_agent/config.py" = [
"TRY004", # ValueError is appropriate for config parsing
"FBT001", # boolean default args in config helpers
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
"--cov=different_agent",
"--cov-report=term-missing",
"--cov-fail-under=80",
]
filterwarnings = ["error"]
[tool.coverage.run]
branch = true
source = ["src/different_agent"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]
[tool.ty.environment]
python-version = "3.11"