-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpyproject.toml
More file actions
168 lines (148 loc) · 4.34 KB
/
Copy pathpyproject.toml
File metadata and controls
168 lines (148 loc) · 4.34 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "impactguard"
version = "0.1.21"
description = "Lightweight API impact analyzer for Python projects"
readme = "README.md"
requires-python = ">=3.13"
license = {text = "MIT"}
authors = [
{name = "Darío Clavijo", email = "clavijodario@gmail.com"}
]
dependencies = [
"libcst>=0.4.0",
"pre-commit>=4.6.0",
"pyyaml>=6.0",
]
[project.optional-dependencies]
dev = [
"ruff",
"mypy",
"hatchling",
"pip-api",
]
test = [
"pytest",
"pytest-cov",
"pytest-mock",
"pytest-asyncio",
"hypothesis",
]
lint = [
"ruff",
"prospector",
"mypy",
"vulture",
]
languages = [
"tree-sitter>=0.23,<0.26",
"tree-sitter-typescript>=0.23,<0.26",
"tree-sitter-java>=0.23,<0.26",
"tree-sitter-go>=0.23,<0.26",
"tree-sitter-rust>=0.23,<0.26",
"tree-sitter-c>=0.23,<0.26",
"tree-sitter-cpp>=0.23,<0.26",
"tree-sitter-ruby>=0.23,<0.26",
"tree-sitter-javascript>=0.23,<0.26",
"tree-sitter-kotlin>=0.23,<2",
"tree-sitter-swift>=0.7.2,<0.8",
"tree-sitter-zig>=0.23,<2",
"tree-sitter-c-sharp>=0.23,<0.26",
"tree-sitter-haskell>=0.23,<0.26",
]
formal = ["z3-solver>=4.13.0"]
fast = ["fast-walk>=0.2.1"]
all = ["impactguard[dev,test,lint,languages,formal,fast]"]
[project.scripts]
impactguard = "impactguard.__main__:main"
impactguard-check-staged = "impactguard.__main__:check_staged"
impactguard-post-commit-hook = "impactguard.__main__:post_commit_hook"
# Third-party packages can contribute additional language extractors by
# declaring entry points in this group. Each entry point must reference a
# class (not an instance) that satisfies the LanguageExtractor protocol.
# Example (in your package's pyproject.toml):
# [project.entry-points."impactguard.languages"]
# mylang = "mypkg.mylang_extractor:MyLangExtractor"
[project.entry-points."impactguard.languages"]
[project.urls]
Homepage = "https://github.com/daedalus/ImpactGuard"
Repository = "https://github.com/daedalus/ImpactGuard"
Issues = "https://github.com/daedalus/ImpactGuard/issues"
[tool.hatch.build.targets.wheel]
packages = ["src/impactguard"]
[tool.hatch.build.targets.sdist]
include = ["src/impactguard"]
[tool.ruff]
line-length = 88
target-version = "py313"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "ANN", "TCH", "N", "C4", "ARG"]
ignore = ["E501", "ANN401"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "E402"]
"tests/*" = ["ANN", "TCH", "N806", "E712", "F401", "F402", "ARG001", "ARG002", "ARG005", "UP038", "F841", "C416"]
"tests/test_consolidated.py" = ["E402"]
"tests/test_coverage_consolidated.py" = ["E402"]
"tests/test_coverage_misc.py" = ["E402"]
"src/impactguard/cli.py" = ["E402"]
"src/impactguard/trace_calls.py" = ["ANN401"]
"src/impactguard/trace_calls_prod.py" = ["ANN401", "E402"]
"src/impactguard/analyze_module.py" = ["N802"]
"src/impactguard/extract_calls.py" = ["N802"]
"src/impactguard/extract_signatures.py" = ["N802"]
"src/impactguard/languages/*.py" = ["F821", "N806", "TC003", "F401"]
"src/impactguard/feedback.py" = ["N806"]
"src/impactguard/pipeline.py" = ["ARG001", "F823"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
python_version = "3.13"
strict = true
warn_return_any = true
warn_unused_ignores = true
exclude = ["src/impactguard/__init__.py", "src/impactguard/__main__.py", "src/impactguard/_pathutils.py", "examples", "tests"]
[tool.prospector]
output-format = "text"
strictness = "medium"
test-warnings = false
[tool.prospector.tools]
pylint = true
pyflakes = true
mccabe = true
[tool.pylint.messages_control]
disable = [
"wrong-import-position",
"import-outside-toplevel",
"pointless-string-statement",
"unspecified-encoding",
"unused-import",
"too-many-branches",
"too-many-locals",
"consider-using-enumerate",
"no-else-return",
"consider-using-with",
]
[tool.mccabe]
max-complexity = 20
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --tb=short --cov=src --cov-fail-under=80"
filterwarnings = ["ignore::DeprecationWarning"]
[tool.coverage.run]
source = ["src"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[dependency-groups]
dev = [
"build>=1.5.0",
]