-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
125 lines (107 loc) · 3.26 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
[project]
name = "dynamo"
version = "0.1.0"
description = "\"Bot for personal use\""
readme = "README.md"
license = { file = "LICENSE" }
requires-python = "<3.14,>=3.13.0"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: The Unlicense (Unlicense)",
"Operating System :: OS Independent",
"Typing :: Typed",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.13"
]
dependencies = [
"apsw>=3.47.0.0",
"base2048>=0.1.3",
"discord-py[speed]",
"dynaconf>=3.2.6",
"dynamo-utils",
"msgspec",
"numpy>=2.1.3",
"pandas>=2.2.3",
"pillow>=11.0.0",
"platformdirs>=4.3.6",
"toml>=0.10.2",
"truststore>=0.10.0",
"xlsxwriter>=3.2.0",
"xxhash>=3.5.0",
]
[tool.uv.sources]
discord-py = { git = "https://github.com/Rapptz/discord.py.git" }
msgspec = { git = "https://github.com/jcrist/msgspec.git", rev = "main" }
dynamo-utils = { git = "https://github.com/trumully/dynamo-utils.git" }
[project.scripts]
dynamo = "dynamo.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
src = ["dynamo"]
target-version = "py313"
line-length = 90
preview = true
[tool.ruff.lint]
select = [
"A", "ANN", "ASYNC", "B", "BLE", "C4", "COM", "DTZ", "E",
"EM", "ERA", "F", "FA", "FURB", "G", "I", "INP", "ISC", "NPY",
"PD", "PERF", "PGH", "PIE", "PLC", "PLE", "PLR", "PLW", "PTH", "PYI",
"Q", "Q003", "RET", "RSE", "RUF", "S", "SIM", "SLOT", "T20", "TC", "TID",
"TRY", "UP", "YTT"
]
ignore = [
"ANN401", # Any is correct in some cases
"D1", # Well named items don't need docstrings
"E501", # Ruff handles this
"RET504", # A bit too opinionated
"RET505",
"RET506",
"RET507",
"RET508",
"RUF029", # Some interfaces need an async method
"S101", # Allow assert
"PLC0415", # Top-of-file imports are not always best
# These screw with formatting
"COM812",
"ISC001",
"PLR6301",
]
unfixable = [
"E501", # Handled by ruff format
"F841", # I'm planning to use it
"ERA", # Allow commented code
]
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["PLC1901", "PLR2004", "PLR6301", "S", "TID252"]
[tool.ruff.lint.pydocstyle]
convention = "google"
"ignore-decorators" = [
"typing.overload",
]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
# https://discuss.python.org/t/problems-with-typeis/55410/6
# https://discuss.python.org/t/problems-with-typeis/55410/46
# Until what can go into a TypeIs/TypeGuard changes, these are just dangerous.
"typing.TypeIs".msg = "TypeIs is fundamentally unsafe, even when using it as described to be safe"
"typing.TypeGuard".msg = "TypeGuard is fundamentally unsafe"
"typing_extensions.TypeIs".msg = "TypeIs is fundamentally unsafe, even when using it as described to be safe"
"typing_extensions.TypeGuard".msg = "TypeGuard is fundamentally unsafe"
[tool.pyright]
include = ["dynamo"]
exclude = [
"**/__pycache__",
"build",
"dist",
]
pythonVersion = "3.13"
typeCheckingMode = "strict"
pythonPlatform = "All"
reportImportCycles = "error"
reportPropertyTypeMismatch = "error"
reportShadowedImports = "error"
reportUninitializedInstanceVariable = "error"
reportUnnecessaryTypeIgnoreComment = "warning"