mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix mypy violations
This commit is contained in:
@@ -145,13 +145,13 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
|
|||||||
|
|
||||||
# write the project file
|
# write the project file
|
||||||
with codecs.open(path.join(outdir, outname + '.qhp'), 'w', 'utf-8') as f: # type: ignore # NOQA
|
with codecs.open(path.join(outdir, outname + '.qhp'), 'w', 'utf-8') as f: # type: ignore # NOQA
|
||||||
content = render_file('project.qhp', outname=outname,
|
body = render_file('project.qhp', outname=outname,
|
||||||
title=self.config.html_title, version=self.config.version,
|
title=self.config.html_title, version=self.config.version,
|
||||||
project=self.config.project, namespace=nspace,
|
project=self.config.project, namespace=nspace,
|
||||||
master_doc=self.config.master_doc,
|
master_doc=self.config.master_doc,
|
||||||
sections=sections, keywords=keywords,
|
sections=sections, keywords=keywords,
|
||||||
files=self.get_project_files(outdir))
|
files=self.get_project_files(outdir))
|
||||||
f.write(content)
|
f.write(body)
|
||||||
|
|
||||||
homepage = 'qthelp://' + posixpath.join(
|
homepage = 'qthelp://' + posixpath.join(
|
||||||
nspace, 'doc', self.get_target_uri(self.config.master_doc))
|
nspace, 'doc', self.get_target_uri(self.config.master_doc))
|
||||||
@@ -159,10 +159,10 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
|
|||||||
|
|
||||||
logger.info('writing collection project file...')
|
logger.info('writing collection project file...')
|
||||||
with codecs.open(path.join(outdir, outname + '.qhcp'), 'w', 'utf-8') as f: # type: ignore # NOQA
|
with codecs.open(path.join(outdir, outname + '.qhcp'), 'w', 'utf-8') as f: # type: ignore # NOQA
|
||||||
content = render_file('project.qhcp', outname=outname,
|
body = render_file('project.qhcp', outname=outname,
|
||||||
title=self.config.html_short_title,
|
title=self.config.html_short_title,
|
||||||
homepage=homepage, startpage=startpage)
|
homepage=homepage, startpage=startpage)
|
||||||
f.write(content)
|
f.write(body)
|
||||||
|
|
||||||
def isdocnode(self, node):
|
def isdocnode(self, node):
|
||||||
# type: (nodes.Node) -> bool
|
# type: (nodes.Node) -> bool
|
||||||
|
|||||||
Reference in New Issue
Block a user