-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
109 lines (94 loc) · 2.96 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
[project]
name = "dapi-docs-webhook-watcher"
description = "Discord API webhook poller for Discord"
requires-python = ">=3.11,<3.13"
version = "0.1"
[dependency-groups]
main = [
"click",
"requests",
"python-dateutil",
"python-dotenv",
]
freeze-locks = ["uv"]
lint = [
"codespell>=2.2.2",
"pre-commit-hooks>=4.4",
"slotscheck>=0.16.1",
"ruff",
]
reformat = [
"black>=22.10.0",
"isort>=5.11.3",
"pre-commit-hooks>=4.4",
"pycln>=2.1.2",
"sort-all>=1.2",
]
templating = ["Jinja2>=3.1.2"]
type-checking = [
"mypy>=0.991",
"nox",
"pyright>=1.1.285",
{include-group = "main"},
]
[tool.black]
include = ".*pyi?$"
line-length = 120
skip-magic-trailing-comma = true
target-version = ["py311"]
[tool.isort]
profile = "black"
force_single_line = true
[tool.pyright]
include = ["noxfile.py", "runner.py"]
pythonVersion = "3.11"
typeCheckingMode = "strict"
reportMissingModuleSource = "error" # Is only "warning" on strict mode.
# Error code which are disabled even when general strict.
reportShadowedImports = "error"
reportCallInDefaultInitializer = "none" # Ended up just complaining about cases where this was fine (e.g. timedeltas).
reportImplicitStringConcatenation = "none" # Conflicts with Ruff config.
reportPropertyTypeMismatch = "error"
reportUninitializedInstanceVariable = "error"
reportUnnecessaryTypeIgnoreComment = "error"
[tool.piped]
default_sessions = ["reformat", "lint", "spell-check", "type-check"]
hide = ["build", "generate_docs", "publish", "slot-check", "test", "test_coverage", "test_publish", "verify-markup", "verify_types"]
top_level_targets = ["./noxfile.py", "./runner.py"]
[tool.piped.github_actions."*"]
default_py_ver = "3.11"
[tool.piped.github_actions.docker_publish]
[tool.piped.github_actions.freeze_for_pr]
[tool.piped.github_actions.lint]
[tool.piped.github_actions.reformat]
[tool.piped.github_actions.resync_piped]
[tool.piped.github_actions.type_check]
[tool.piped.github_actions.upgrade_locks]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"COM812", # Trailing comma missing (incompatible with black)
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D105", # Missing docstring in magic method
"INP001", # File `` is part of an implicit namespace package. Add an `__init__.py`.
"S113", # Probable use of `requests` call without timeout
]
[tool.ruff.lint.per-file-ignores]
"noxfile.py" = [
"F403", # `from noxfile import *` used; unable to detect undefined name
]
[tool.ruff.lint.mccabe]
max-complexity = 20
[tool.ruff.lint.pycodestyle]
# Technically this is 120, but black has a policy of "1 or 2 over is fine if it is tidier", so we have to raise this.
max-line-length = 130
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pylint]
max-args = 20
max-branches = 20
max-returns = 15
max-statements = 100