Repository navigation
Commit 784fa73
authored
Style deprecation notices in the API reference (#329)
Preparation for the client-common 0.4.1 update, so deprecation notices
already look right by the time it adds them.
Two things: a CSS rule that styles the `deprecated` admonition class
(gravestone icon, its own colour, otherwise like a warning), and the
[griffe-warnings-deprecated](https://mkdocstrings.github.io/griffe-warnings-deprecated/)
extension wired into the mkdocstrings handler so symbols decorated with
`typing_extensions.deprecated` get an admonition generated for them.
The extension's `kind` is set to `deprecated` rather than the default
`warning`, so what it emits is markup-identical to a hand-written
`Deprecated:` admonition. One rule styles both, which matters because
the decorator cannot reach module-level aliases, a single function
argument, enum members or whole modules.3 files changed
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
0 commit comments