-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
85 lines (75 loc) · 3.14 KB
/
pyproject.toml
File metadata and controls
85 lines (75 loc) · 3.14 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
[project]
name = "libdestruct"
authors = [
{name = "MrIndeciso"},
]
description = "Native structs made Pythonic"
requires-python = ">=3.10"
license = {file = "LICENSE"}
readme = {file = "README.md", content-type = "text/markdown"}
version = "0.1.0a"
classifiers = [
"Development Status :: 1 - Planning",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: C",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Security",
"Topic :: Software Development :: Debuggers",
"Typing :: Typed",
]
keywords = ["struct", "c", "debugger", "memory", "reverse", "rev", "reverse-engineering", "script", "libdebug"]
dependencies = ["typing_extensions", "pycparser"]
[project.optional-dependencies]
dev = [
"rich",
"ty",
]
[tool.setuptools.packages.find]
include = ["libdestruct*"]
[tool.ty.src]
exclude = ["test/", "build/"]
[tool.ty.rules]
# -- Dynamic metaclass/descriptor inflation pattern --
# The type registry, struct metaclass, and descriptor protocol resolve attributes
# at runtime in ways that ty cannot yet follow (_type_impl, _member_offsets, etc).
unresolved-attribute = "ignore"
# -- Rules that caught real bugs --
# Keep as warn until annotations are improved, then promote to error.
invalid-return-type = "warn" # union.diff() returns dict, ptr.__getitem__ returns bytes
invalid-argument-type = "warn" # union.__init__ passes None as Resolver
invalid-type-form = "warn" # lowercase `callable`, `iter` as type, `...` as annotation
missing-argument = "warn" # wrong _backing_type: type[obj] (should be obj) in enum/flags
too-many-positional-arguments = "warn" # array.__setitem__ calls set() with wrong arity
# -- Intentional design patterns --
invalid-method-override = "warn" # deliberate param narrowing in _set/set overrides (LSP)
invalid-assignment = "warn" # _backing_type instance vs type confusion; descriptor __set__
unsupported-operator = "warn" # obj.get() returns `object`, operators on result untypeable
call-non-callable = "warn" # dynamic inflater dispatch: resolved_type(resolver)
not-subscriptable = "warn" # object.__setattr__ hides dict types from checker
no-matching-overload = "warn" # untyped dict in struct_parser
invalid-yield = "warn" # yield from dynamic __getitem__ typed as object
[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py310"
exclude = ["test/"]
[tool.ruff.lint]
select = ["ALL"]
ignore = ["D100", "D104", "EM", "FBT", "G", "TD", "TRY002", "TRY003", "RET505", "SLF001", "S603", "S606", "N801", "COM812"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"