-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
186 lines (164 loc) · 6.08 KB
/
pyproject.toml
File metadata and controls
186 lines (164 loc) · 6.08 KB
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
[project]
name = "mkdocstrings-python-betterrefs"
version = "1.0.2"
license = "Apache-2.0"
description = "Extended mkdocstrings-python handler with better cross-references support"
readme = "README.md"
authors = [
{ name = "Christopher Barber", email = "Christopher.Barber@analog.com" },
{ name = "ItsDrike", email = "itsdrike@protonmail.com" },
]
maintainers = [{ name = "ItsDrike", email = "itsdrike@protonmail.com" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Documentation",
"Topic :: Software Development",
"Topic :: Software Development :: Documentation",
"Topic :: Utilities",
"Typing :: Typed",
]
keywords = ["documentation", "mkdocstrings", "mkdocstrings-handler"]
requires-python = ">=3.9"
dependencies = [
"mkdocstrings-python>=1.14.1,<1.15.0",
"griffe>=1.0.0",
"typing-extensions>=4.0",
]
[project.urls]
Homepage = "https://itsdrike.github.com/mkdocstrings-python-betterrefs/"
Documentation = "https://itsdrike.github.com/mkdocstrings-python-betterrefs/"
Repository = "https://github.com/ItsDrike/mkdocstrings-python-betterrefs"
Issues = "https://github.com/ItsDrike/mkdocstrings-python-betterrefs/issues"
[tool.uv]
default-groups = ["lint", "test", "docs"]
[dependency-groups]
lint = [
"pre-commit>=3.3.3",
"ruff>=0.9.2",
"basedpyright>=1.13.3",
]
test = [
"beautifulsoup4>=4.13.3",
"pytest>=8.3.4",
]
docs = [
# Most of the docs dependencies are already a part of the project itself
"mike>=2.1.2",
"mkdocs-material>=9.5.30",
]
[tool.pytest.ini_options]
filterwarnings = [
"error",
]
[tool.basedpyright]
pythonPlatform = "All"
pythonVersion = "3.9"
typeCheckingMode = "all"
# Diagnostic behavior settings
strictListInference = false
strictDictionaryInference = false
strictSetInference = false
analyzeUnannotatedFunctions = true
strictParameterNoneValue = true
enableTypeIgnoreComments = true
deprecateTypingAliases = true
enableExperimentalFeatures = false
# Diagnostic rules
reportAny = false
reportExplicitAny = false
reportImplicitStringConcatenation = false
reportUnreachable = "hint"
reportUnusedParameter = "hint"
reportUnannotatedClassAttribute = false
reportUnknownArgumentType = false # consider enabling
reportUnknownVariableType = false # consider enabling
reportUnknownMemberType = false # consider enabling
reportUnknownParameterType = false # consider enabling
reportUnknownLambdaType = false # consider enabling
reportMissingTypeStubs = "information" # consider bumping to warning/error
reportUninitializedInstanceVariable = false # until https://github.com/DetachHead/basedpyright/issues/491
reportMissingParameterType = false # ruff's flake8-annotations (ANN) already covers this + gives us more control
[tool.ruff]
target-version = "py39"
line-length = 119
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"C90", # mccabe
"FBT", # flake8-boolean-trap
"CPY", # flake8-copyright
"EM", # flake8-errmsg
"SLF", # flake8-self
"ARG", # flake8-unused-arguments
"TD", # flake8-todos
"FIX", # flake8-fixme
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D203", # Blank line required before class docstring
"D213", # Multi-line summary should start at second line (incompatible with D212)
"D301", # Use r""" if any backslashes in a docstring
"D405", # Section name should be properly capitalized
"D406", # Section name should end with a newline
"D407", # Missing dashed underline after section
"D408", # Section underline should be in the line following the section's name
"D409", # Section underline should match the length of its name
"D410", # Missing blank line after section
"D411", # Missing blank line before section
"D412", # No blank lines allowed between a section header and its content
"D413", # Missing blank line after last section
"D414", # Section has no content
"D416", # Section name should end with a colon
"D417", # Missing argument descrition in the docstring
"ANN002", # Missing type annotation for *args
"ANN003", # Missing type annotation for **kwargs
"ANN204", # Missing return type annotation for special method
"ANN401", # Dynamically typed expressions (typing.Any) disallowed
"SIM102", # use a single if statement instead of nested if statements
"SIM108", # Use ternary operator {contents} instead of if-else-block
"TC001", # Move application imports used only for annotations into a type-checking block
"TC002", # Move 3rd-party imports used only for annotations into a type-checking block
"TC003", # Move standard library imports used only for annotations into a type-checking block
"TD002", # Missing author in TODO
"TD003", # Missing issue link on the line following this TODO
"TRY003", # No f-strings in raise statements
"EM101", # No string literals in exception init
"EM102", # No f-strings in exception init
"PLR2004", # Using unnamed numerical constants
"PGH003", # Using specific rule codes in type ignores
"E731", # Don't assign a lambda expression, use a def
]
[tool.ruff.lint.extend-per-file-ignores]
"tests/*" = [
"ANN", # flake8-annotations
"S101", # Use of assert
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 20
max-branches = 20
max-returns = 20
max-statements = 250
[tool.ruff.format]
line-ending = "lf"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
only-include = ["src/mkdocstrings_handlers"]
sources = ["src"]