-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
139 lines (120 loc) · 5.27 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
[tool.ruff]
line-length = 90
target-version = "py312"
preview = true
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint]
select = [
"A", "ANN", "ASYNC", "B", "BLE", "C4", "COM", "DTZ", "E",
"EM", "ERA", "F", "FA", "FBT", "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 = [
"ANN202", # implied return fine sometimes
"ANN204", # special method return types
"ANN401", # Any is the correct type in some cases
"ASYNC116", # Long sleeps are fine
"B901", # I'm aware of how generators as coroutines work
"C90", # mccabe complexity memes
"COM812", # ruff format suggested
"D",
"D105", # documenting magic methods is often dumb.
"E501", # ruff format suggested
"FBT003", # Wrong end to enforce this on.
"G002", # erroneous issue with %-logging when logging can be confiured for % logging
"ISC001", # ruff format suggested
"PLC0105", # no, I don't like co naming style for typevars
"PLC0415", # ruff gets this wrong, import needs to be not at top of file in some cases
"PLR0904", # too many public methods
"PLR0912", # too many branches
"PLR0913", # number of function arguments
"PLR0915", # too many statements.... in an async entrypoint handling graceful shutdown...
"PLR0917", # too many positional arguments
"PLR2004", # Magic value comparison, may remove later
"RUF001", # ambiguous characters not something I want to enforce here.
"RUF029", # no, don't try andd tell me I'm wrong for async def when something is for an interface.
"S101", # use of assert here is a known quantity, blame typing memes
"S311", # Yes, I know that standard pseudo-random generators are not suitable for cryptographic purposes
"SIM105", # supressable exception, I'm not paying the overhead of contextlib.supress for stylistic choices.
"TC001", # I prefer to avoid if TYPE_CHECKING
"TC002", # I prefer to avoid if TYPE_CHECKING
"TC003", # I prefer to avoid if TYPE_CHECKING
"UP007", # "Use | For Union" doesn't account for typevar tuple unpacking.
"UP031", # No, I like % formatting more for some things...
]
unfixable = [
"E501", # line length handled in other ways by ruff format
"ERA", # Don't delete commented out code
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[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"
"typing.runtime_checkable".msg = "Runtime checkable is fundamentally unsafe."
"typing_extensions.runtime_checkable".msg = "Runtime checkable is fundamentally unsafe."
# these don't work as deferred imports, intentionally, because type checkers are dumb
# and require they be imported directly from typing to work, this breaks the deferred re-export.
"typing.Final".msg = "see https://github.com/microsoft/pyright/issues/9664#issuecomment-2574042580"
"typing_extensions.Final".msg = "see https://github.com/microsoft/pyright/issues/9664#issuecomment-2574042580"
"typing.final".msg = "see https://github.com/microsoft/pyright/issues/9664#issuecomment-2574042580"
"typing_extensions.final".msg = "see https://github.com/microsoft/pyright/issues/9664#issuecomment-2574042580"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "scheduler"
description = "an easy scheduler for discord.py"
readme = "README.md"
license = "MPL-2.0"
requires-python = ">=3.12"
authors = [{ name = "Michael Hall", email = "michael@michaelhall.tech" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: OS Independent",
"Typing :: Typed",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dynamic = ["version"]
dependencies = [
"arrow>=1.2.3",
"apsw>=3.45.1.0",
"msgspec>=0.19.0",
"pytz>=2024",
]
[project.urls]
Homepage = "https://github.com/mikeshardmind/discord-scheduler"
[tool.hatch.version]
path = "scheduler/__init__.py"
[tool.hatch.build.targets.sdist]
include = [
"/scheduler",
"/LICENSE",
]
[tool.hatch.build.targets.wheel]
include = ["/scheduler/*"]
[tool.pyright]
include = ["scheduler"]
typeCheckingMode = "strict"
pythonVersion = "3.12"
pythonPlatform = "All"
reportCallInDefaultInitializer = "warning"
reportImplicitOverride = "warning"
reportImportCycles = "error"
reportPropertyTypeMismatch = "error"
reportShadowedImports = "error"
reportUninitializedInstanceVariable = "error"
reportUnnecessaryTypeIgnoreComment = "warning"