Commit bfaf30d
committed
fix(docs): remove
By removing the `typehints_formatter` we are able to resolve
issues #570 and #734. The former issue is resolved by removing
the non-picklable function, which enables build caching, and the
second is solved by removing the `TypeVar` bound replacement.
While the `TypeVar` replacement does provide more concise
documentation, it removes a key piece of information, which the
reader must be aware of. For example, in:
```python
T = TypeVar("T", bound=Data)
def typevar(a: T, b: T) -> None: ...
def bound(a: Data, b: Data): ...
def valid(a: SupervisedData, b: SupervisedData): ...
def invalid(a: Data, b: SupervisedData): ...
```
the `typevar` function is the actual specification, `bound` is the
documented specification, `valid` is a valid specification, and
`invalid` is an invalid specification which is presented as valid
in the documentation (if we replace the `TypeVar` with the bound).
As an additional comment, we do now lose the functionality of the
`autodoc_custom_types` -- it should be noted that the `ArrayLike`
custom type (the only listed custom type) doesn't appear to be
used anywhere in the codebase.
Refs: #570, #734typehints_formatter.1 parent 94fc03c commit bfaf30d
1 file changed
+1
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
33 | | - | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
78 | 75 | | |
79 | 76 | | |
80 | 77 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | 78 | | |
87 | 79 | | |
88 | 80 | | |
| |||
216 | 208 | | |
217 | 209 | | |
218 | 210 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 211 | | |
224 | 212 | | |
225 | 213 | | |
226 | 214 | | |
227 | 215 | | |
228 | 216 | | |
229 | 217 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | 218 | | |
264 | 219 | | |
265 | 220 | | |
| |||
0 commit comments