-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
161 lines (144 loc) · 3.67 KB
/
pyproject.toml
File metadata and controls
161 lines (144 loc) · 3.67 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
[project]
authors = [
{ name = "Daniel Sanz", email = "imsdn4z@gmail.com" },
{ name = "Sergio Castillo", email = "s.cast.lara@gmail.com" },
{ name = "Ludo van Orden" },
{ name = "Dmitrii Fedotov" },
]
maintainers = [
{ name = "Daniel Sanz", email = "imsdn4z@gmail.com" },
{ name = "Sergio Castillo", email = "s.cast.lara@gmail.com" },
]
requires-python = "<4,>=3.10"
dependencies = [
"requests<3.0.0,>=2.32.4",
"rapidfuzz<4.0.0,>=2.13.7",
"pyparsing<4.0.0,>=3.2.3",
"tomlkit>=0.11.6,<0.15.0",
"pydantic>=2.11.7,<3.0.0",
"pyyaml>=6.0.2",
]
name = "twyn"
description = "Security tool against dependency typosquatting attacks"
readme = "README.md"
dynamic = ["version"]
[project.optional-dependencies]
cli = [
"click<9.0.0,>=8.1.8",
"rich>=14.0.0,<16.0.0",
]
mcp = [
"fastmcp>=3.0.2",
]
[tool.hatch.version]
path = "VERSION"
pattern = "v(?P<version>[^\\s]+)"
[tool.hatch.build.targets.wheel]
packages = ["src/twyn"]
[tool.hatch.build.targets.sdist]
include = ["/src", "/README.md", "/LICENSE", "/VERSION", "/pyproject.toml"]
[project.scripts]
twyn = "twyn.cli:entry_point"
[dependency-groups]
dev = [
"pytest>=7.1.3,<10.0.0",
"mypy>=0.982,<1.21",
"pytest-cov>=4,<8",
"ruff>=0.5.1,<0.15.11",
"types-requests<3.0.0.0,>=2.32.4.20250611",
"types-python-dateutil>=2.9.0.20250809",
"freezegun>=1.5.5",
"types-pyyaml>=6.0.12.20250822",
]
download = [
"click>=8.1.8",
"httpx>=0.28.1",
"stamina>=25.1.0",
]
local = ["ipdb<1.0.0,>=0.13.9", "commitizen<5.0,>=2.38", "pdbpp<1.0.0,>=0.11.6"]
[tool.uv]
default-groups = []
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
target-version = "py310"
line-length = 120
src = ["twyn", "tests"]
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C", # mccabe
"E", # pycodestyle
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # bugbear
"D", # pydocstyle
"I", # isort
"C4", # comprehensions
"SIM", # simplify
"N", # pep8-naming
"TRY", # tryceratops
"UP", # pyupgrade
"PT", # pytest-style
"TCH", # type-checking
"PL", # pylint
"G", # logging format
"TID", # tidy-imports
]
ignore = [
"E501", # line-length (enforced by black instead)
'D1', # pydocstyle enforces docstrings everywhere
'TRY003', # tryceratops rule not useful
"PLR0913", # pylint rule not useful
"B008", # checks for function calls in default function arguments.
'D206', # conflicts with formatter
'W191', # conflicts with formatter
'D203', # conflicts with formatter
'D211', # conflicts with formatter
'D212', # conflicts with formatter
'UP031', # allow strings formated with %s
'PLR2004', # magic value
]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
namespace_packages = true
explicit_package_bases = true
warn_no_return = false
warn_unused_ignores = true
disallow_any_generics = true
[tool.pytest.ini_options]
addopts = """
-s
--cov
--cov-report term-missing
--cov-report=xml:./tests/coverage.xml
--junitxml=./tests/junit.xml
"""
[tool.coverage.run]
omit = ["tests/*"]
[tool.coverage.report]
fail_under = 95
exclude_lines = ["if TYPE_CHECKING:", "pragma: no cover"]
[tool.lgtm]
categories = ["Correctness", "Quality", "Testing", "Security"]
model = "gemini-2.5-pro"
silent = false
publish = true
ai_retries = 2
exclude = [
"*.md",
"poetry.lock",
"uv.lock",
"gradle.lockfile",
"Podfile.lock",
"Package.resolved",
"Cartfile.resolved",
"yarn.lock",
"package-lock.json",
"pnpm-lock.yaml",
]