-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
114 lines (96 loc) · 3.1 KB
/
pyproject.toml
File metadata and controls
114 lines (96 loc) · 3.1 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "dragonfly-reporter"
version = "0.1.0"
description = "Reports malicious packages to PyPI."
authors = [{name = "Vipyr Security Developers", email = "support@vipyrsec.com"}]
license = {text = "MIT"}
classifiers = ["Private :: Do Not Upload"]
requires-python = ">=3.13,<3.14"
dependencies = [
"fastapi-slim==0.128.0",
"httpx==0.28.1",
"pydantic-settings==2.12.0",
"sentry-sdk==2.51.0",
"uvicorn[standard]==0.40.0",
]
[project.urls]
homepage = "https://vipyrsec.com/"
source = "https://github.com/vipyrsec/dragonfly-reporter.git"
issues = "https://github.com/vipyrsec/dragonfly-reporter/issues"
[dependency-groups]
dev = ["pre-commit", "pyright", "ruff"]
test = ["coverage", "pytest"]
[tool.uv]
default-groups = ["dev", "test"]
[tool.hatch.build.targets.wheel]
packages = ["src/reporter"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.ruff]
line-length = 120
target-version = "py312"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"FIX", # https://docs.astral.sh/ruff/rules/#flake8-fixme-fix
"G004", # https://docs.astral.sh/ruff/rules/#flake8-logging-log
"N818", # https://docs.astral.sh/ruff/rules/error-suffix-on-exception-name/
"S101", # https://docs.astral.sh/ruff/rules/assert/
"TC001", # https://docs.astral.sh/ruff/rules/typing-only-first-party-import/
"TC002", # https://docs.astral.sh/ruff/rules/typing-only-third-party-import/
"TC003", # https://docs.astral.sh/ruff/rules/typing-only-standard-library-import/
"TD002", # https://docs.astral.sh/ruff/rules/missing-todo-author/
"TD003", # https://docs.astral.sh/ruff/rules/missing-todo-link/
# Conflicting rules with format (https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules)
"COM812",
"COM819",
"D206",
"D300",
"E111",
"E114",
"E117",
"ISC001",
"ISC002",
"Q000",
"Q001",
"Q002",
"Q003",
"W191",
]
[tool.ruff.lint.isort]
known-first-party = ["reporter", "logging_config"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"ANN",
"D",
"INP",
"PLR2004", # https://docs.astral.sh/ruff/rules/magic-value-comparison/
"S105", # https://docs.astral.sh/ruff/rules/hardcoded-password-string/
"S106", # https://docs.astral.sh/ruff/rules/hardcoded-password-func-arg/
"S107", # https://docs.astral.sh/ruff/rules/hardcoded-password-default/
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pyright]
venvPath = "."
venv = ".venv"
typeCheckingMode = "strict"
# deprecateTypingAliases = true
# reportCallInDefaultInitializer = "error"
# reportImplicitOverride = "error"
# reportImplicitStringConcatenation = "error"
# reportImportCycles = "error"
# reportMissingSuperCall = "error"
# reportPropertyTypeMismatch = "error"
# reportShadowedImports = "error"
# reportUninitializedInstanceVariable = "error"
# reportUnnecessaryTypeIgnoreComment = "error"
# reportUnusedCallResult = "error"
[tool.coverage.run]
branch = false
source = ["src/reporter/"]
[tool.coverage.report]
fail_under = 100