Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/_css/mkdocstrings.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,25 @@ a.autorefs-external::after {
a.autorefs-external:hover::after {
background-color: var(--md-accent-fg-color);
}

/* A "Deprecated" admonition, styled like a warning but with its own icon. */
:root {
--md-admonition-icon--deprecated: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 2h4c3.31 0 5 2.69 5 6v10.66C16.88 17.63 15.07 17 12 17s-4.88.63-7 1.66V8c0-3.31 1.69-6 5-6M8 8v1.5h8V8zm1 4v1.5h6V12zM3 22v-.69c2.66-1.69 10.23-5.47 18-.06V22z"/></svg>');
}

.md-typeset .admonition.deprecated,
.md-typeset details.deprecated {
border-color: #cc9900;
}

.md-typeset .deprecated > .admonition-title,
.md-typeset .deprecated > summary {
background-color: #cc99001a;
}

.md-typeset .deprecated > .admonition-title::before,
.md-typeset .deprecated > summary::before {
background-color: #cc9900;
-webkit-mask-image: var(--md-admonition-icon--deprecated);
mask-image: var(--md-admonition-icon--deprecated);
}
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ plugins:
python:
paths: ["src"]
options:
extensions:
- griffe_warnings_deprecated:
kind: deprecated
title: Deprecated
docstring_section_style: spacy
inherited_members: true
merge_init_into_class: false
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ dev-formatting = ["black == 26.5.1", "isort == 9.0.1"]
dev-mkdocs = [
"Markdown == 3.10.3",
"black == 26.5.1",
"griffe-warnings-deprecated == 1.1.1",
"mike == 2.2.0",
"mkdocs-gen-files == 0.6.1",
"mkdocs-literate-nav == 0.6.3",
Expand Down
6 changes: 3 additions & 3 deletions src/frequenz/core/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def __lt__(self, other: Self, /) -> bool:
)
"""Type variable for a value that is [`LessThanComparable`][..LessThanComparable] or `None`.

Warning: Deprecated
This type variable is deprecated and it will be removed in a future version. Use
[`LessThanComparableT`][..LessThanComparableT] instead.
Deprecated:
This type variable is deprecated since v1.4.0 and it will be removed in a
future version. Use [`LessThanComparableT`][..LessThanComparableT] instead.
"""


Expand Down
Loading