Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
pawamoy committed Aug 20, 2025
commit 77f23ea14539c249d9abae1575fe80c2072ed958
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{# YORE: Bump 2: Remove file. #}
{% extends "_base/docstring/type_aliases.html.jinja" %}

{% block logs scoped %}
{{ super() }}
{# TODO: Switch to a warning after some time. #}
{{ log.info(
"DeprecationWarning: Extending '_base/docstring/type_aliases.html' is deprecated, extend '_base/docstring/type_aliases.html.jinja' instead. " ~
"After some time, this message will be logged as a warning, causing strict builds to fail.",
{{ log.warning(
"DeprecationWarning: Extending '_base/docstring/type_aliases.html' is deprecated, extend '_base/docstring/type_aliases.html.jinja' instead. ",
once=True,
) }}
{% endblock logs %}
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{# YORE: Bump 2: Remove file. #}
{% extends "_base/docstring/type_parameters.html.jinja" %}

{% block logs scoped %}
{{ super() }}
{# TODO: Switch to a warning after some time. #}
{{ log.info(
"DeprecationWarning: Extending '_base/docstring/type_parameters.html' is deprecated, extend '_base/docstring/type_parameters.html.jinja' instead. " ~
"After some time, this message will be logged as a warning, causing strict builds to fail.",
{{ log.warning(
"DeprecationWarning: Extending '_base/docstring/type_parameters.html' is deprecated, extend '_base/docstring/type_parameters.html.jinja' instead. ",
once=True,
) }}
{% endblock logs %}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ Context:
{#- Language module providing the `t` translation method. -#}

{% with %}
{% set is_merged_init = obj.is_function and obj.name == "__init__" and config.merge_init_into_class %}

{% if config.docstring_section_style == "table" %}
{% block table_style scoped %}
{#- Block for the `table` section style. -#}
<p><span class="doc-section-title">{{ section.title or lang.t("Type Parameters:") if not is_merged_init else lang.t("<code>__init__</code> Type Parameters:") }}</span></p>
<p><span class="doc-section-title">{{ section.title or lang.t("Type Parameters:") }}</span></p>
<table>
<thead>
<tr>
Expand All @@ -42,7 +40,7 @@ Context:
{% filter heading(
heading_level + 1,
role="typeparam",
id=obj.path ~ ":" ~ type_parameter.name,
id=obj.path ~ "[" ~ type_parameter.name ~ "]",
class="doc doc-heading doc-heading-type_parameter",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-type_parameter"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + type_parameter.name,
) %}
Expand Down Expand Up @@ -81,15 +79,15 @@ Context:
{% elif config.docstring_section_style == "list" %}
{% block list_style scoped %}
{#- Block for the `list` section style. -#}
<p><span class="doc-section-title">{{ section.title or lang.t("Type Parameters:") if not is_merged_init else lang.t("<code>__init__</code> Type Parameters:") }}</span></p>
<p><span class="doc-section-title">{{ section.title or lang.t("Type Parameters:") }}</span></p>
<ul>
{% for type_parameter in section.value %}
<li class="doc-section-item field-body">
{% if config.type_parameter_headings %}
{% filter heading(
heading_level + 1,
role="typeparam",
id=obj.path ~ ":" ~ type_parameter.name ,
id=obj.path ~ "[" ~ type_parameter.name ~ "]",
class="doc doc-heading doc-heading-type_parameter",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-type_parameter"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + type_parameter.name,
) %}
Expand Down Expand Up @@ -130,7 +128,7 @@ Context:
<table>
<thead>
<tr>
<th><span class="doc-section-title">{{ (section.title or lang.t("TYPE PARAMETER")).rstrip(":").upper() if not is_merged_init else lang.t("<code>__init__</code> TYPE PARAMETER") }}</span></th>
<th><span class="doc-section-title">{{ (section.title or lang.t("TYPE PARAMETER")).rstrip(":").upper() }}</span></th>
<th><span>{{ lang.t("DESCRIPTION") }}</span></th>
</tr>
</thead>
Expand All @@ -142,7 +140,7 @@ Context:
{% filter heading(
heading_level + 1,
role="typeparam",
id=obj.path ~ ":" ~ type_parameter.name ,
id=obj.path ~ "[" ~ type_parameter.name ~ "]"
class="doc doc-heading doc-heading-type_parameter",
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-type_parameter"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + type_parameter.name,
) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@
"Type Aliases:": "Type Aliases:",
"TYPE ALIAS": "TYPE ALIAS",
"Type Parameters:": "Type Parameters:",
"<code>__init__</code> Type Parameters:": "<code>__init__</code> Type Parameters:"|safe,
"TYPE PARAMETER": "TYPE PARAMETER",
"<code>__init__</code> TYPE PARAMETER": "<code>__init__</code> TYPE PARAMETER"|safe,
"WARNS": "WARNS",
"Warns:": "Warns:",
"YIELDS": "YIELDS",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{# YORE: Bump 2: Remove file. #}
{% extends "_base/summary/type_aliases.html.jinja" %}

{% block logs scoped %}
{{ super() }}
{# TODO: Switch to a warning after some time. #}
{{ log.info(
"DeprecationWarning: Extending '_base/type_aliases/classes.html' is deprecated, extend '_base/type_aliases/classes.html.jinja' instead. " ~
"After some time, this message will be logged as a warning, causing strict builds to fail.",
{{ log.warning(
"DeprecationWarning: Extending '_base/type_aliases/classes.html' is deprecated, extend '_base/type_aliases/classes.html.jinja' instead.",
once=True,
) }}
{% endblock logs %}
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{# YORE: Bump 2: Remove file. #}
{% extends "_base/type_alias.html.jinja" %}

{% block logs scoped %}
{{ super() }}
{# TODO: Switch to a warning after some time. #}
{{ log.info(
"DeprecationWarning: Extending '_base/type_alias.html' is deprecated, extend '_base/type_alias.html.jinja' instead. " ~
"After some time, this message will be logged as a warning, causing strict builds to fail.",
{{ log.warning(
"DeprecationWarning: Extending '_base/type_alias.html' is deprecated, extend '_base/type_alias.html.jinja' instead. ",
once=True,
) }}
{% endblock logs %}
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{# YORE: Bump 2: Remove file. #}
{% extends "_base/type_parameters.html.jinja" %}

{% block logs scoped %}
{{ super() }}
{# TODO: Switch to a warning after some time. #}
{{ log.info(
"DeprecationWarning: Extending '_base/type_parameters.html' is deprecated, extend '_base/type_parameters.html.jinja' instead. " ~
"After some time, this message will be logged as a warning, causing strict builds to fail.",
{{ log.warning(
"DeprecationWarning: Extending '_base/type_parameters.html' is deprecated, extend '_base/type_parameters.html.jinja' instead.",
once=True,
) }}
{% endblock logs %}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Context:
{{ type_param_prefix }}
{%- if config.separate_signature and config.type_parameter_headings and config.signature_crossrefs -%}
{%- filter stash_crossref(length=type_parameter.name|length) -%}
<autoref identifier="{{ obj.path }}:{{ type_param_prefix }}{{ type_parameter.name }}" optional>{{ type_parameter.name }}</autoref>
<autoref identifier="{{ obj.path }}[{{ type_param_prefix }}{{ type_parameter.name }}]" optional>{{ type_parameter.name }}</autoref>
{%- endfilter -%}
{%- else -%}
{{ type_parameter.name }}
Expand Down
Loading