-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
116 lines (104 loc) · 2.73 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
[tool.poetry]
name = "velum"
version = "0.5.0"
description = "An opinionated wrapper for the Eludris API."
authors = ["Chromosomologist <[email protected]>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.10"
aiohttp = "^3.8.3"
typing-extensions = "^4.4.0"
[tool.poetry.group.dev.dependencies]
ipykernel = "^6.17.1"
pyright = "^1.1.313"
isort = "^5.10.1"
slotscheck = "^0.16.1"
ruff = "^0.1.2"
pre-commit = "^3.5.0"
[tool.poetry.group.speedups.dependencies]
aiohttp = { extras = ["speedups"], version = "^3.8.3" }
ciso8601 = "^2.2.0"
uvloop = { version = "^0.17.0", platform = "linux" }
orjson = "^3.8.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pyright]
include = ["velum", "examples"]
exclude = ["**/__init__.py"]
pythonVersion = "3.10"
typeCheckingMode = "strict"
disableBytesTypePromotions = false
[tool.slotscheck]
strict-imports = true
require-superclass = true
require-subclass = true
exclude-classes = """
(
^velum\\.internal\\.typing_patches:WSMessage$
|^velum\\.internal\\.data_binding:(_JSONLoader|_JSONDumper)$
)
"""
[tool.ruff]
target-version = "py310"
line-length = 100
exclude = [
"examples",
]
select = ["ALL"]
ignore = [
# `self` and `cls` do not need annotations.
"ANN101",
"ANN102",
# Magic methods do not need documentation.
"D105",
# Class docstrings are at the class level.
"D107",
# Docstrings start on first line after class definition (incompatibility between D203 and D211).
"D203",
# Docstrings start on the first line (`"""text\n..."""`; incompatibility between D212 and D213).
"D213",
# Pyright error codes are obnoxiously long.
"PGH003",
# Autodoc types sadly shadow builtins, we just gotta cope.
"A003",
# Module docstrings starting with "This" are fine.
"D404",
# I don't think *enforcing* these rules provides any benefit.
"TD",
"FIX",
# We use assert as a sort-of inline `typing.cast`.
"S101",
# Low argument counts are hard to deal with for api wrappers.
"PLR0913",
# We do not need cryptographically secure randomisation on our heartbeat :).
"S311",
# Rules recommended to disable in combination with formatter.
"COM812",
"COM819",
"E501",
"ISC001",
"Q000",
"Q001",
"Q002",
"Q003",
"W191",
# TODO: Finish documentation and remove these rules.
"D",
]
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.ruff.per-file-ignores]
"__init__.py" = [
# Wildcard imports are fine in __init__; duplicating exports is a pain to maintain.
"F403",
"F405",
# Allow re-exporting modules.
"PLC0414",
]
"__main__.py" = [
# Allow printing in scripts.
"T201",
]
[tool.ruff.isort]
force-single-line = true