Skip to content

Commit b94198d

Browse files
committed
fixup
1 parent b58b601 commit b94198d

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

docs/snippets/package/generics.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
type SomeType[Z] = int | list[Z]
2+
"""Some type alias.
3+
4+
Type parameters:
5+
Z: Some type parameter.
6+
"""
7+
8+
19
class MagicBag[T: (str, bytes) = str](list[T]):
210
"""A magic bag of items.
311

docs/usage/configuration/headings.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,9 @@ plugins:
733733
type: preview
734734

735735
```md exec="on"
736-
::: package.generics.MagicBag
736+
::: package.generics
737737
options:
738+
show_root_heading: false
738739
heading_level: 3
739740
docstring_section_style: list
740741
show_bases: true

duties.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def check_quality(ctx: Context) -> None:
9393
)
9494

9595

96-
@duty
96+
@duty(skip_if=sys.version_info < (3, 13), skip_reason=pyprefix("Skipped: docs require modern generics syntax"))
9797
def check_docs(ctx: Context) -> None:
9898
"""Check if the documentation builds correctly."""
9999
Path("htmlcov").mkdir(parents=True, exist_ok=True)
@@ -128,7 +128,7 @@ def check_api(ctx: Context, *cli_args: str) -> None:
128128
)
129129

130130

131-
@duty
131+
@duty(skip_if=sys.version_info < (3, 13), skip_reason=pyprefix("Skipped: docs require modern generics syntax"))
132132
def docs(ctx: Context, *cli_args: str, host: str = "127.0.0.1", port: int = 8000) -> None:
133133
"""Serve the documentation (localhost:8000).
134134
@@ -144,7 +144,7 @@ def docs(ctx: Context, *cli_args: str, host: str = "127.0.0.1", port: int = 8000
144144
)
145145

146146

147-
@duty
147+
@duty(skip_if=sys.version_info < (3, 13), skip_reason=pyprefix("Skipped: docs require modern generics syntax"))
148148
def docs_deploy(ctx: Context, *, force: bool = False) -> None:
149149
"""Deploy the documentation to GitHub pages.
150150

src/mkdocstrings_handlers/python/templates/material/_base/type_alias.html.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Context:
5151
<span class="doc doc-object-name doc-type_alias-name">{{ type_alias_name }}</span>
5252
{% else %}
5353
{%+ filter highlight(language="python", inline=True) %}
54+
{# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
5455
{{ type_alias_name }}{% include "type_parameters"|get_template with context %} = {{ type_alias.value }}
5556
{% endfilter %}
5657
{% endif %}

0 commit comments

Comments
 (0)