-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
150 lines (138 loc) · 4.2 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
140
141
142
143
144
145
146
147
148
149
150
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "wintersong"
dynamic = ["version"]
description = ''
readme = "README.md"
requires-python = ">=3.12"
license = { file = "LICENSE" }
keywords = ["mkdocs", "theme"]
authors = [{ name = "Thea Flowers", email = "[email protected]" }]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = ["mkdocs>=1.5.0", "pygments>=2.16", "pymdown-extensions>=10.3"]
[tool.hatch.build.targets.wheel]
packages = ["src/wintersong"]
[project.urls]
Documentation = "https://github.com/wntrblm/wintersong#readme"
Issues = "https://github.com/wntrblm/wintersong/issues"
Source = "https://github.com/wntrblm/wintersong"
[project.entry-points."mkdocs.themes"]
wintersong = "wintersong"
[tool.hatch.version]
path = "src/wintersong/__about__.py"
[tool.hatch.envs.default]
dependencies = ["pyright", "pytest", "ruff>=0.1.0"]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
typing = "pyright"
style = ["ruff check {args:.}"]
format = ["ruff format --fix {args:.}"]
lint = ["style", "typing"]
[tool.ruff]
target-version = "py312"
line-length = 120
select = [
# Note: these are ordered to match https://beta.ruff.rs/docs/rules/
"F", # PyFlakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"ASYNC", # flake8-async
"BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"CPY", # flake8-copyright
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"ARG", # flake8-unused-arguments
"PTH", # flake8-pathlib
"TD", # flake8-todo
"PL", # PyLint
"TRY", # tryceratops
"NPY", # NumPy
"RUF", # Ruff
]
ignore = [
"TD002", # missing-todo-author
# PyLint too aggressive about too many args, statements, branches, and
# returns
"PLR0911",
"PLR0912",
"PLR0913",
"PLR0915",
]
unfixable = [
# Don't touch unused imports
"F401",
]
[tool.ruff.isort]
known-first-party = ["sayonara"]
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "parents"
[tool.ruff.per-file-ignores]
# Tests can use magic values, assertions, and relative imports
"tests/**/*" = ["PLR2004", "S101", "TID252"]
[tool.pyright]
include = ["src"]
exclude = ["**/__pycache__"]
reportMissingImports = true
reportMissingTypeStubs = false
pythonVersion = "3.11"
pythonPlatform = "Linux"
typeCheckingMode = "basic"
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
reportAssertAlwaysTrue = "error"
reportInvalidStringEscapeSequence = "error"
reportSelfClsParameterName = "error"
reportConstantRedefinition = "error"
reportDeprecated = "error"
reportDuplicateImport = "error"
reportIncompatibleMethodOverride = "error"
reportIncompatibleVariableOverride = "error"
reportInconsistentConstructor = "error"
reportMatchNotExhaustive = "warning"
reportOverlappingOverload = "error"
reportMissingSuperCall = "error"
reportPrivateUsage = "warning"
reportTypeCommentUsage = "error"
reportUnnecessaryCast = "error"
reportUnnecessaryComparison = "error"
reportUnnecessaryContains = "error"
reportUnnecessaryIsInstance = "error"
reportUnusedClass = "warning"
reportUnusedImport = "warning"
reportUnusedFunction = "warning"
reportUnusedVariable = "warning"
reportUntypedBaseClass = "error"
reportUntypedClassDecorator = "error"
reportUntypedFunctionDecorator = "error"
reportUntypedNamedTuple = "error"
reportCallInDefaultInitializer = "error"
reportImplicitOverride = "error"
reportPropertyTypeMismatch = "warning"
reportShadowedImports = "warning"
reportUninitializedInstanceVariable = "warning"
reportUnnecessaryTypeIgnoreComment = "warning"
reportUnusedCallResult = "warning"