aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc/qtattributionsscannertorst.py
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-06-16 11:28:39 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-06-16 19:15:31 +0200
commit05fdbd6ff3901587eb0c6b192e6666225f49695c (patch)
treefb0ad79cb1204def5ec53c536ffddccb62d2d42e /sources/pyside6/doc/qtattributionsscannertorst.py
parent9446e0c8b4711cb886c2449fd8e17dcb26e69b6b (diff)
Fix some flake8 warnings in the documentation scripts
Pick-to: 6.5 Change-Id: Ifbf248d0cc0aae511b3f96cc03baf80f582f5d4a Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/doc/qtattributionsscannertorst.py')
-rw-r--r--sources/pyside6/doc/qtattributionsscannertorst.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/pyside6/doc/qtattributionsscannertorst.py b/sources/pyside6/doc/qtattributionsscannertorst.py
index 216c1439b..aae4bccf8 100644
--- a/sources/pyside6/doc/qtattributionsscannertorst.py
+++ b/sources/pyside6/doc/qtattributionsscannertorst.py
@@ -26,7 +26,8 @@ def indent(lines, indent):
result = f"{result}{indent}{l}\n"
return result
-rstHeader="""Licenses Used in Qt for Python
+
+rstHeader = """Licenses Used in Qt for Python
******************************
Qt for Python contains some code that is not provided under the
@@ -52,18 +53,23 @@ code licensed under third-party opensource licenses:
"""
+
def rstHeadline(title):
return f"{title}\n{'-' * len(title)}\n"
+
def rstUrl(title, url):
return f"`{title} <{url}>`_"
+
def rstLiteralBlock(lines):
return f"::\n\n{indent(lines, ' ')}\n\n"
+
def rstLiteralBlockFromText(text):
return rstLiteralBlock(text.strip().split('\n'))
+
def readFile(fileName):
with open(fileName, 'r') as file:
return file.readlines()