Use `str.format_map` (#12534)

This commit is contained in:
Adam Turner 2024-07-10 19:39:22 +01:00 committed by GitHub
parent fa8c81a634
commit 1cc9699b2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -374,7 +374,7 @@ class Manpage(ReferenceRole):
inner: nodes.Node
text = self.title[1:] if self.disabled else self.title
if not self.disabled and self.config.manpages_url:
uri = self.config.manpages_url.format(**info)
uri = self.config.manpages_url.format_map(info)
inner = nodes.reference('', text, classes=[self.name], refuri=uri)
else:
inner = nodes.Text(text)