diff -r c1af2e327675 -r bedbe458d792 eric6/UI/CodeDocumentationViewerTemplate.py --- a/eric6/UI/CodeDocumentationViewerTemplate.py Tue Sep 24 18:46:24 2019 +0200 +++ b/eric6/UI/CodeDocumentationViewerTemplate.py Tue Sep 24 19:08:10 2019 +0200 @@ -86,13 +86,17 @@ char, '<span class="argspec-highlight">{0}</span>'.format( char)) - argspec = argspecTemplate\ - .replace("@NAME@", name)\ + argspec = ( + argspecTemplate + .replace("@NAME@", name) .replace("@ARGSPEC@", argspec) + ) else: - argspec = argspecTemplate\ - .replace("@NAME@", name)\ + argspec = ( + argspecTemplate + .replace("@NAME@", name) .replace("@ARGSPEC@", "") + ) if "typ" in documentationInfo and documentationInfo["typ"]: typeInfo = typeTemplate.replace("@TYPE@", @@ -106,33 +110,42 @@ else: note = "" - metaData = metadataTemplate\ - .replace("@ARGSPEC@", argspec)\ - .replace("@TYPE@", typeInfo)\ + metaData = ( + metadataTemplate + .replace("@ARGSPEC@", argspec) + .replace("@TYPE@", typeInfo) .replace("@NOTE@", note) + ) - header = headerTemplate\ - .replace("@TITLE@", title)\ + header = ( + headerTemplate + .replace("@TITLE@", title) .replace("@METADATA@", metaData) + ) else: header = "" if "docstring" in documentationInfo and documentationInfo["docstring"]: - docstring = documentationInfo["docstring"]\ - .replace("\r\n", "<br/>")\ - .replace("\n", "<br/>")\ + docstring = ( + documentationInfo["docstring"] + .replace("\r\n", "<br/>") + .replace("\n", "<br/>") .replace("\r", "<br/>") + ) docstring = docstringTemplate.replace("@DOCSTRING@", docstring) else: - docstring = \ - """<div class="hr"></div><div id="doc-warning">{0}</div>"""\ + docstring = ( + """<div class="hr"></div><div id="doc-warning">{0}</div>""" .format(QCoreApplication.translate( "CodeDocumentationViewer", "No further documentation available")) + ) - return mainTemplate\ - .replace("@HEADER@", header)\ + return ( + mainTemplate + .replace("@HEADER@", header) .replace("@DOCSTRING@", docstring) + ) def prepareDocumentationViewerHtmlDocWarningDocument(text):