-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
165 lines (151 loc) · 4.01 KB
/
pyproject.toml
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
[project]
name = "pons"
version = "0.8.1"
description = "Async RPC client for Ethereum"
authors = [
{name = "Bogdan Opanchuk", email = "[email protected]"},
]
dependencies = [
"httpx>=0.22",
"eth-account>=0.13",
"eth-utils>=2",
"eth-abi>=5.0.1",
"anyio>=3",
"setuptools", # required by eth-utils, but it just assumes that it's already installed
"trio-typing>=0.9.0",
"compages>=0.3",
"ethereum-rpc>=0.1",
]
requires-python = ">=3.10"
license = "MIT"
readme = "README.md"
[project.urls]
homepage = "https://github.com/fjarri-eth/pons"
[project.optional-dependencies]
compiler = [
"py-solc-x>=2",
]
local-provider = [
"alysis>=0.5.0",
"starlette",
"hypercorn",
]
tests = [
"pytest>=6",
"trio>=0.19.0",
"pytest-trio",
"pytest-cov",
"mypy-extensions>=1",
# from `compiler` feature
"py-solc-x>=2",
# from `local-provider` feature
"alysis>=0.3.0",
"starlette",
"hypercorn",
]
docs = [
"sphinx>=4",
"furo",
"sphinxcontrib-trio",
"setuptools-scm",
]
lint = [
"mypy>=1.4",
"ruff>=0.2",
]
[tool.pdm]
version = { source = "scm" }
[tool.pdm.build]
source-includes = [
"tests/*.sol",
"tests/*.py",
"docs/*.rst",
"docs/*.py",
"docs/Makefile",
".coveragerc",
"mypy.ini",
"pytest.ini",
]
[tool.setuptools_scm]
[build-system]
requires = ["pdm-pep517"]
build-backend = "pdm.pep517.api"
[tool.mypy]
plugins = "trio_typing.plugin"
strict = true
warn_unreachable = true
# otherwise mypy fails to pick up signatures from eth_* packages
implicit_reexport = true
[tool.pytest.ini_options]
trio_mode = true
[tool.ruff]
target-version = "py310"
line-length = 100
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# It's a stylistic choice. Don't save on matches.
"C408",
# It's never a problem unless you mutate function arguments (which is rarely a good idea).
"B008",
# The type of `self` is derived automatically.
"ANN101",
# We use `Any` quite a bit because we need to accept a lot of third-party unnormalized input.
"ANN401",
# The return type of `__init__` is derived automatically.
"ANN204",
# The type of `cls` in classmethods is derived automatically.
"ANN102",
# Doesn't mesh well with the way `black` puts the final parenthesis on a separate line
# in functions with one parameter and a long argument.
"COM812",
# The formatting message is actually useful in a traceback.
"EM102",
# Could be useful, but triggers on built-in exception classes (e.g. `ValueError`),
# which are supposed to be used like that.
"TRY003",
# Mutually exclusive with D213, which we prefer.
"D212",
# Mutually exclusive with D211, which we prefer.
"D203",
# Small project, no need to assign authors in TODOs.
"TD002",
# A trade-off between traceback noise and code noise. I prefer less code noise.
"EM101",
# Would be a good rule, but has weird false positives
# (it triggers even if it's only one sentence but a long one).
"D205",
# Not sure on this one. The code has been using third-person form before,
# but I can see the potential merit.
"D401",
# Not helpful. Issues ID should be enough to silence both of these.
"TD003",
"FIX002",
# Too much code noise. A concept of error can be conveyed
# without using the word "error" explicitly.
"N818",
# Too ham-fisted. 5 arguments is too small of a limit.
"PLR0913",
# Conflicts with the formatter, according to the warning.
"ISC001",
# Too many false positives, since Ruff cannot tell that the object is immutable.
"RUF009",
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
exclude = [
".eggs",
".git",
".mypy_cache",
".ruff_cache",
".venv",
"__pypackages__",
"build",
"dist",
]
per-file-ignores = {}
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.isort]
known-first-party = ["pons"]