forked from alibaba/sec-code-bench
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
86 lines (76 loc) · 1.77 KB
/
pyproject.toml
File metadata and controls
86 lines (76 loc) · 1.77 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
[project]
name = "sec-code-bench"
version = "1.0.0"
description = "A framework for evaluating security metrics of LLM-generated code"
authors = [
]
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"openai>=1.0.0",
"anthropic>=0.30.0",
"tiktoken>=0.7.0",
"tenacity==9.1.2",
"fastapi==0.116.1",
"uvicorn[standard]==0.24.0",
"websocket-client==1.8.0",
"tqdm==4.67.1",
"psutil==7.0.0"
]
[tool.pytest.ini_options]
pythonpath = ["."]
[dependency-groups]
dev = [
"pytest>=8.4.1",
"ruff>=0.12.2",
"aiofiles==24.1.0",
"numpy==2.3.2",
"pandas==2.3.1"
]
[tool.ruff]
# Set code formatting rules
line-length = 90
indent-width = 4
# Set the target Python version
target-version = "py312"
[tool.ruff.lint]
# Enabled rule sets
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort (import sorting)
"C", # mccabe (complexity checks)
"B", # flake8-bugbear (common bug detection)
"Q", # flake8-quotes (quote checks)
"SIM", # flake8-simplify (code simplification suggestions)
"UP", # pyupgrade (syntax upgrade suggestions)
]
# Ignored rules
extend-ignore = [
"C901", # Complexity checking is too strict
]
# Set the severity level for rules
extend-select = [
"I001", # Check import sorting
]
[tool.ruff.format]
# Set code formatting options
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.isort]
# Set import sorting rules
known-first-party = ["sec_code_bench"]
[tool.pyright]
include = ["sec_code_bench"]
exclude = ["**/node_modules",
"**/__pycache__",
"src/experimental",
"src/typestubs",
"datasets",
"results",
"logs",
"docker"
]