-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
157 lines (139 loc) · 3.91 KB
/
pyproject.toml
File metadata and controls
157 lines (139 loc) · 3.91 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[build-system]
requires = ["poetry-core>=2.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "hip4"
version = "0.1.0"
description = "Python SDK for Hyperliquid HIP-4 prediction markets"
readme = "README.md"
authors = ["Dennis Furrer"]
license = "BUSL-1.1"
repository = "https://github.com/perps-studio/hip-4-py"
homepage = "https://github.com/perps-studio/hip-4-py"
packages = [{ include = "hip4" }]
keywords = [
"hyperliquid",
"hip4",
"hip-4",
"prediction-markets",
"binary-outcomes",
"eip712",
"sdk",
"web3",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Office/Business :: Financial",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[tool.poetry.dependencies]
python = "^3.10"
eth-account = ">=0.10.0,<0.14.0"
eth-utils = ">=2.1.0,<6.0.0"
msgpack = "^1.0.5"
requests = "^2.31.0"
websocket-client = "^1.5.1"
httpx = { version = "^0.27.0", optional = true }
websockets = { version = "^13.0", optional = true }
[tool.poetry.extras]
async = ["httpx", "websockets"]
[tool.poetry.group.dev.dependencies]
pytest = "^8.3.4"
pytest-asyncio = "^0.24.0"
pytest-cov = "^6.0.0"
pytest-recording = "^0.13.2"
coverage = "^7.6.10"
mypy = "^1.14.1"
black = "^24.10.0"
isort = "^5.13.2"
pre-commit = "^4.1.0"
types-requests = "^2.31.0"
ruff = "^0.8.0"
[tool.black]
line-length = 120
target-version = ["py310"]
[tool.isort]
py_version = 310
line_length = 120
profile = "black"
known_typing = ["typing", "types", "typing_extensions"]
sections = ["FUTURE", "TYPING", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
include_trailing_comma = true
multi_line_output = 3
indent = 4
[tool.mypy]
python_version = "3.10"
pretty = true
show_traceback = true
color_output = true
allow_redefinition = false
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
ignore_missing_imports = true
implicit_reexport = true
no_implicit_optional = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = ["msgpack", "websocket", "websocket.*"]
ignore_missing_imports = true
# The HTTP client deserializes dynamic JSON via `response.json()` which is
# typed `Any`. Public methods declare TypedDict return types for users - the
# Any -> TypedDict cast is conceptual. Relax warn_return_any here so we don't
# litter call sites with `cast(...)` that buys nothing.
[[tool.mypy.overrides]]
module = ["hip4.sync.client", "hip4.aio.client"]
warn_return_any = false
# eth_account returns Any from key.hex() / .address attribute access. Wrap
# locally rather than pollute call sites.
[[tool.mypy.overrides]]
module = ["hip4.auth"]
warn_return_any = false
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP", "N", "RUF"]
ignore = ["E501"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
norecursedirs = ["hooks", "*.egg", ".eggs", "dist", "build", "docs", ".tox", ".git", "__pycache__"]
addopts = [
"--strict-markers",
"--tb=short",
"--cov-report=term-missing",
"--cov-report=html",
"--cov=hip4",
]
markers = [
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
]
[tool.coverage.run]
branch = true
source = ["hip4"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]