@@ -148,7 +148,7 @@ def do_format_signature(
148
148
The same code, formatted.
149
149
"""
150
150
env = context .environment
151
- # TODO: Stop using `do_get_template` when `* .html` templates are removed .
151
+ # YORE: Bump 2: Replace `do_get_template(env, "signature")` with `"signature .html.jinja"` .
152
152
template = env .get_template (do_get_template (env , "signature" ))
153
153
154
154
if annotations is None :
@@ -208,7 +208,7 @@ def do_format_attribute(
208
208
The same code, formatted.
209
209
"""
210
210
env = context .environment
211
- # TODO: Stop using `do_get_template` when `* .html` templates are removed .
211
+ # YORE: Bump 2: Replace `do_get_template(env, "expression")` with `"expression .html.jinja"` .
212
212
template = env .get_template (do_get_template (env , "expression" ))
213
213
annotations = context .parent ["config" ].show_signature_annotations
214
214
@@ -269,6 +269,7 @@ def do_order_members(
269
269
return sorted (members , key = _order_map [order ])
270
270
271
271
272
+ # YORE: Bump 2: Remove block.
272
273
@lru_cache
273
274
def _warn_crossref () -> None :
274
275
warnings .warn (
@@ -278,6 +279,7 @@ def _warn_crossref() -> None:
278
279
)
279
280
280
281
282
+ # YORE: Bump 2: Remove block.
281
283
def do_crossref (path : str , * , brief : bool = True ) -> Markup :
282
284
"""Deprecated. Filter to create cross-references.
283
285
@@ -298,6 +300,7 @@ def do_crossref(path: str, *, brief: bool = True) -> Markup:
298
300
)
299
301
300
302
303
+ # YORE: Bump 2: Remove block.
301
304
@lru_cache
302
305
def _warn_multi_crossref () -> None :
303
306
warnings .warn (
@@ -307,6 +310,7 @@ def _warn_multi_crossref() -> None:
307
310
)
308
311
309
312
313
+ # YORE: Bump 2: Remove block.
310
314
def do_multi_crossref (text : str , * , code : bool = True ) -> Markup :
311
315
"""Deprecated. Filter to create cross-references.
312
316
@@ -520,7 +524,10 @@ def formatter(code: str, line_length: int) -> str:
520
524
return formatter
521
525
522
526
527
+ # YORE: Bump 2: Remove line.
523
528
@pass_environment
529
+ # YORE: Bump 2: Replace `env: Environment, ` with `` within line.
530
+ # YORE: Bump 2: Replace `str | ` with `` within line.
524
531
def do_get_template (env : Environment , obj : str | Object ) -> str | Template :
525
532
"""Get the template name used to render an object.
526
533
@@ -537,6 +544,7 @@ def do_get_template(env: Environment, obj: str | Object) -> str | Template:
537
544
if name := extra_data .get ("template" , "" ):
538
545
return name
539
546
name = obj .kind .value
547
+ # YORE: Bump 2: Replace block with `return f"{name}.html.jinja"`.
540
548
try :
541
549
template = env .get_template (f"{ name } .html" )
542
550
except TemplateNotFound :
0 commit comments