@@ -84,9 +84,7 @@ def handleMatch(self, m, data) -> Union[Element, EvalIDType]: # type: ignore[ov
8484
8585 return self .makeTag (identifier , text ), m .start (0 ), end
8686
87- def evalId (
88- self , data : str , index : int , text : str
89- ) -> EvalIDType : # noqa: N802 (parent's casing)
87+ def evalId (self , data : str , index : int , text : str ) -> EvalIDType : # noqa: N802 (parent's casing)
9088 """Evaluate the id portion of `[ref][id]`.
9189
9290 If `[ref][]` use `[ref]`.
@@ -157,9 +155,7 @@ def relative_url(url_a: str, url_b: str) -> str:
157155 return f"{ relative } #{ anchor } "
158156
159157
160- def fix_ref (
161- url_mapper : Callable [[str ], str ], unmapped : List [str ]
162- ) -> Callable : # noqa: WPS212,WPS231
158+ def fix_ref (url_mapper : Callable [[str ], str ], unmapped : List [str ]) -> Callable : # noqa: WPS212,WPS231
163159 """Return a `repl` function for [`re.sub`](https://docs.python.org/3/library/re.html#re.sub).
164160
165161 In our context, we match Markdown references and replace them with HTML links.
@@ -225,9 +221,7 @@ def fix_refs(html: str, url_mapper: Callable[[str], str]) -> Tuple[str, List[str
225221class AutorefsExtension (Extension ):
226222 """Extension that inserts auto-references in Markdown."""
227223
228- def extendMarkdown (
229- self , md : Markdown
230- ) -> None : # noqa: N802 (casing: parent method's name)
224+ def extendMarkdown (self , md : Markdown ) -> None : # noqa: N802 (casing: parent method's name)
231225 """Register the extension.
232226
233227 Add an instance of our [`AutoRefInlineProcessor`][mkdocs_autorefs.references.AutoRefInlineProcessor] to the Markdown parser.
@@ -268,9 +262,7 @@ def __init__(self) -> None:
268262 super ().__init__ ()
269263 self ._url_map : Dict [str , str ] = {}
270264 self ._abs_url_map : Dict [str , str ] = {}
271- self .get_fallback_anchor : Optional [
272- Callable [[str ], Optional [str ]]
273- ] = None # noqa: WPS234
265+ self .get_fallback_anchor : Optional [Callable [[str ], Optional [str ]]] = None # noqa: WPS234
274266 self ._priority_patterns = None
275267
276268 @property
@@ -355,9 +347,7 @@ def get_item_url( # noqa: WPS234
355347 """
356348 return self ._get_item_url (identifier , fallback )
357349
358- def on_config (
359- self , config : Config , ** kwargs
360- ) -> Config : # noqa: W0613,R0201 (unused arguments, cannot be static)
350+ def on_config (self , config : Config , ** kwargs ) -> Config : # noqa: W0613,R0201 (unused arguments, cannot be static)
361351 """Instantiate our Markdown extension.
362352
363353 Hook for the [`on_config` event](https://www.mkdocs.org/user-guide/plugins/#on_config).
@@ -375,9 +365,7 @@ def on_config(
375365 config ["markdown_extensions" ].append (AutorefsExtension ())
376366 return config
377367
378- def on_page_markdown (
379- self , markdown : str , page : Page , ** kwargs
380- ) -> str : # noqa: W0613 (unused arguments)
368+ def on_page_markdown (self , markdown : str , page : Page , ** kwargs ) -> str : # noqa: W0613 (unused arguments)
381369 """Remember which page is the current one.
382370
383371 Arguments:
@@ -391,9 +379,7 @@ def on_page_markdown(
391379 self .current_page = page .url # noqa: WPS601
392380 return markdown
393381
394- def on_page_content (
395- self , html : str , page : Page , ** kwargs
396- ) -> str : # noqa: W0613 (unused arguments)
382+ def on_page_content (self , html : str , page : Page , ** kwargs ) -> str : # noqa: W0613 (unused arguments)
397383 """Map anchors to URLs.
398384
399385 Hook for the [`on_page_content` event](https://www.mkdocs.org/user-guide/plugins/#on_page_content).
@@ -431,9 +417,7 @@ def map_urls(self, page: Page, anchor: AnchorLink) -> None:
431417 for child in anchor .children :
432418 self .map_urls (page , child )
433419
434- def on_post_page (
435- self , output : str , page : Page , ** kwargs
436- ) -> str : # noqa: W0613 (unused arguments)
420+ def on_post_page (self , output : str , page : Page , ** kwargs ) -> str : # noqa: W0613 (unused arguments)
437421 """Fix cross-references.
438422
439423 Hook for the [`on_post_page` event](https://www.mkdocs.org/user-guide/plugins/#on_post_page).
0 commit comments