@@ -112,7 +112,7 @@ def __init__(self, parser: MarkdownIt) -> None:
112112 if k .startswith ("render_" ) and k != "render_children"
113113 }
114114 # these are lazy loaded, when needed
115- self ._inventories : None | dict [str , inventory .InventoryType ] = None
115+ self ._inventories : dict [str , inventory .InventoryType ] | None = None
116116
117117 def __getattr__ (self , name : str ):
118118 """Warn when the renderer has not been setup yet."""
@@ -300,7 +300,7 @@ def nested_render_text(
300300 text : str ,
301301 lineno : int ,
302302 inline : bool = False ,
303- temp_root_node : None | nodes .Element = None ,
303+ temp_root_node : nodes .Element | None = None ,
304304 heading_offset : int = 0 ,
305305 ) -> None :
306306 """Render unparsed text (appending to the current node).
@@ -988,7 +988,7 @@ def render_link(self, token: SyntaxTreeNode) -> None:
988988 return self .render_link_unknown (token )
989989
990990 def render_link_url (
991- self , token : SyntaxTreeNode , conversion : None | UrlSchemeType = None
991+ self , token : SyntaxTreeNode , conversion : UrlSchemeType | None = None
992992 ) -> None :
993993 """Render link token (including autolink and linkify),
994994 where the link has been identified as an external URL.
@@ -2113,7 +2113,7 @@ def default_slugify(title: str) -> str:
21132113def compute_unique_slug (
21142114 token_tree : SyntaxTreeNode ,
21152115 slugs : Container [str ],
2116- slug_func : None | Callable [[str ], str ] = None ,
2116+ slug_func : Callable [[str ], str ] | None = None ,
21172117) -> str :
21182118 """Compute the slug for a heading token, unique against existing slugs."""
21192119 slug_func = github_slugify if slug_func is None else slug_func
0 commit comments