mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix `SIM904
`, directly construct dicts (#11059)
This commit is contained in:
parent
ff202240ab
commit
124bbce049
1
.flake8
1
.flake8
@ -21,7 +21,6 @@ ignore =
|
||||
SIM223,
|
||||
SIM300,
|
||||
SIM401,
|
||||
SIM904,
|
||||
SIM905,
|
||||
SIM907,
|
||||
exclude =
|
||||
|
@ -148,11 +148,11 @@ class Epub3Builder(_epub_base.EpubBuilder):
|
||||
"""Create a dictionary with all metadata for the nav.xhtml file
|
||||
properly escaped.
|
||||
"""
|
||||
metadata = {}
|
||||
metadata['lang'] = html.escape(self.config.epub_language)
|
||||
metadata['toc_locale'] = html.escape(self.guide_titles['toc'])
|
||||
metadata['navlist'] = navlist
|
||||
return metadata
|
||||
return {
|
||||
'lang': html.escape(self.config.epub_language),
|
||||
'toc_locale': html.escape(self.guide_titles['toc']),
|
||||
'navlist': navlist
|
||||
}
|
||||
|
||||
def build_navigation_doc(self) -> None:
|
||||
"""Write the metainfo file nav.xhtml."""
|
||||
|
Loading…
Reference in New Issue
Block a user