Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
88 lines (77 loc) · 1.85 KB
/
Copy pathpyproject.toml
File metadata and controls
88 lines (77 loc) · 1.85 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
[project]
name = "py-fuzzer"
version = "0.0.0"
description = "Run Ruff or ty on randomly generated Python source files."
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"pysource-codegen>=0.6.0",
"pysource-minimize>=0.8.0",
"rich-argparse>=1.7.0",
"ruff>=0.11.9",
"termcolor>=3.1.0",
]
[project.scripts]
fuzz = "fuzz:main"
[build-system]
requires = ["flit-core>=3.12,<4"]
build-backend = "flit_core.buildapi"
[dependency-groups]
dev = ["mypy", "ruff", "ty"]
[tool.flit.module]
name = "fuzz"
[tool.mypy]
files = "fuzz.py"
pretty = true
strict = true
warn_unreachable = true
local_partial_types = true
enable_error_code = "ignore-without-code,redundant-expr,truthy-bool"
[tool.ty.rules]
possibly-unresolved-reference = "error"
unused-ignore-comment = "error"
[tool.ruff]
fix = true
preview = true
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = true
[tool.ruff.lint]
select = [
"ARG",
"E",
"F",
"B",
"B9",
"C4",
"SIM",
"I",
"UP",
"PIE",
"PGH",
"PYI",
"RUF",
]
ignore = [
# only relevant if you run a script with `python -0`,
"B011",
# These are enforced by, or incompatible with, the ruff formatter:
"E203",
"E501",
]
unfixable = [
"F841", # unused variable. ruff keeps the call, but mostly it's best to get rid of it all
"F601", # automatic fix might obscure issue
"F602", # automatic fix might obscure issue
"B018", # automatic fix might obscure issue
"RUF017", # Ruff's fix is faster, but I prefer using itertools.chain_from_iterable
]
[tool.ruff.lint.isort]
combine-as-imports = true
split-on-trailing-comma = false
[tool.uv]
no-build = true
no-binary-package = ["py-fuzzer"]
# Pin the isolated build environment for source-build exceptions.
build-constraint-dependencies = ["flit-core==3.12.0"]
exclude-newer = "P7D"