-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathpyproject.toml
102 lines (94 loc) · 3.14 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
[project]
name = "open-sol-bot"
version = "0.2.0"
description = "Open Solana Trading Bot"
authors = [
{ name = "mkdir700", email = "mkdir700@gmail.com" },
]
requires-python = "==3.10.*"
readme = "README.md"
license = { text = "Apache-2.0" }
dependencies = [
"solbot-cache",
"solbot-cache-preloader",
"solbot-common",
"solbot-db",
"solbot-services",
"solbot-tgbot",
"solbot-trading",
"solbot-wallet-tracker",
"solbot-yellowstone-grpc",
]
[tool.setuptools]
packages = []
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "INFO"
[tool.uv.sources]
solbot-trading = { path = "app/trading", editable = true }
solbot-wallet-tracker = { path = "app/wallet-tracker", editable = true }
solbot-cache-preloader = { path = "app/cache-preloader", editable = true }
solbot-tgbot = { path = "app/tg-bot", editable = true }
solbot-cache = { path = "libs/cache", editable = true }
solbot-db = { path = "libs/db", editable = true }
solbot-services = { path = "libs/services", editable = true }
solbot-yellowstone-grpc = { path = "libs/yellowstone_grpc", editable = true }
solbot-common = { path = "libs/common", editable = true }
[dependency-groups]
dev = [
"pytest>=8.3.4",
"pre-commit>=4.0.1",
"jupyter>=1.1.1",
"pytest-asyncio>=0.24.0",
"pytest-xprocess==0.18.1",
"py==1.10.0",
"ruff>=0.3.4",
]
[tool.ruff]
target-version = "py310"
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"N", # pep8-naming
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line too long, handled by formatter
# 以下是暂时忽略的错误,后续可以逐步修复
"RUF001",
"RUF002",
"RUF003",
"B007", # Loop control variable not used within loop body
"B017", # pytest.raises(Exception) should be considered evil
"B019", # Use of functools.lru_cache on methods can lead to memory leaks
"B904", # Within an except clause, raise exceptions with raise ... from err
"C408", # Unnecessary dict call (rewrite as a literal)
"E402", # Module level import not at top of file
"E712", # Avoid equality comparisons to True/False
"F403", # from module import * used; unable to detect undefined names
"F841", # Local variable is assigned to but never used
"N801", # Class name should use CapWords convention
"N802", # Function name should be lowercase
"N805", # First argument of a method should be named self
"N806", # Variable in function should be lowercase
"N818", # Exception name should be named with an Error suffix
"SIM105", # Use contextlib.suppress instead of try-except-pass
"SIM108", # Use ternary operator instead of if-else-block
"SIM117", # Use a single with statement with multiple contexts
"UP038", # Use X | Y in isinstance call instead of (X, Y)
]
[tool.ruff.lint.isort]
known-first-party = ["app", "libs"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
skip-magic-trailing-comma = false