-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (115 loc) · 2.47 KB
/
Copy pathpyproject.toml
File metadata and controls
134 lines (115 loc) · 2.47 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
[build-system]
requires = ["hatchling~=1.29.0"]
build-backend = "hatchling.build"
[project]
name = "ethereum-types"
description = "Types used by the Ethereum Specification."
readme = "README.md"
license = "CC0-1.0"
dynamic = ["version"]
requires-python = ">= 3.11"
dependencies = [
"typing-extensions~=4.15.0",
"mypy-extensions~=1.1.0",
]
[project.urls]
documentation = "https://ethereum.github.io/ethereum-types/"
source = "https://github.com/ethereum/ethereum-types/"
[dependency-groups]
doc = [
"docc>=0.6.2,<0.7"
]
test = [
"pytest~=9.0.3",
"pytest-cov~=7.1.0",
]
lint = [
{ include-group = "test" },
"mypy~=2.1.0",
]
dev = [
{ include-group = "test" },
{ include-group = "doc" },
{ include-group = "lint" },
]
[tool.mypy]
files = ["src", "tests"]
strict = true
disallow_any_unimported = true
ignore_missing_imports = false
warn_unreachable = true
enable_error_code = [
"explicit-override",
"possibly-undefined",
"truthy-bool",
"truthy-iterable",
"ignore-without-code",
"mutable-override",
]
[tool.hatch]
# TODO: Pending hatch>1.6
# lock-envs = true
[tool.hatch.envs.doc]
dependency-groups = ["doc"]
[tool.hatch.envs.hatch-test]
dependency-groups = ["test"]
[tool.hatch.envs.hatch-static-analysis]
dependency-groups = ["lint"]
[tool.hatch.envs.hatch-static-analysis.scripts]
format-check = "ruff format{env:HATCH_FMT_ARGS:} --check --diff {args:.}"
format-fix = "ruff format{env:HATCH_FMT_ARGS:} {args:.}"
lint-check = [
"ruff check{env:HATCH_FMT_ARGS:} {args:.}",
"mypy",
]
lint-fix = [
"ruff check{env:HATCH_FMT_ARGS:} --fix {args:.}",
"mypy",
]
[tool.hatch.build]
sources = ["src"]
[tool.hatch.version]
path = "src/ethereum_types/__init__.py"
[tool.pytest.ini_options]
required_plugins = ["pytest-cov"]
addopts = [
"--cov-fail-under=100",
"--cov=ethereum_types",
"--cov-report=term",
]
markers = [
"fixed: exactly-sized integers like U256, U64, etc.",
"arbitrary: arbitrarily large numbers like Uint",
"unsigned: numbers greater than or equal to zero",
]
[tool.docc.output]
path = "docs"
[tool.docc.plugins."docc.python.discover"]
paths = [
"src",
]
[tool.ruff]
line-length = 79
[tool.ruff.lint]
ignore = [
"PLR2004",
"UP006",
"UP007",
"UP035",
"UP045",
"TID252",
"PLC0415",
"PYI034",
"RET506",
"S101",
"SLF001",
"RET505",
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"D103",
"SIM201",
"SIM202",
"SIM300",
"INP001",
]