aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside6/tests/registry/scrape_testresults.py30
-rw-r--r--sources/shiboken6/libshiboken/embed/embedding_generator.py6
-rw-r--r--sources/shiboken6/tests/shiboken_paths.py3
3 files changed, 19 insertions, 20 deletions
diff --git a/sources/pyside6/tests/registry/scrape_testresults.py b/sources/pyside6/tests/registry/scrape_testresults.py
index 89ff8d16b..44677444b 100644
--- a/sources/pyside6/tests/registry/scrape_testresults.py
+++ b/sources/pyside6/tests/registry/scrape_testresults.py
@@ -2,6 +2,17 @@
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
from __future__ import annotations
+from bs4 import BeautifulSoup
+from datetime import datetime
+from multiprocessing import Pool
+from textwrap import dedent
+import requests
+import os
+import time
+import re
+import json
+import argparse
+
"""
scrape_testresults.py
@@ -26,21 +37,11 @@ DEMO_URL = ("https://testresults.qt.io/coin/api/results/pyside/pyside-setup/"
# The above URL part is fixed.
"30c1193ec56a86b8d0920c325185b9870f96941e/"
"MacOSMacOS_10_12x86_64MacOSMacOS_10_12x86_64Clangqtci-macos-"
- "10.12-x86_64-8-425364DebugAndRelease_Release/"
+ "10.12-x86_64-8-425364DebugAndRelease_Release/"
"d80c5d4547ea2b3d74188bd458955aae39cb32b4/"
"test_1535865484/"
"log.txt.gz")
-from bs4 import BeautifulSoup
-from datetime import datetime
-from multiprocessing import Pool
-from textwrap import dedent
-import requests
-import os
-import time
-import re
-import json
-import argparse
my_name = __file__ if __file__.endswith(".py") else __file__[:-1]
test_path = os.path.join(os.path.dirname(__file__), "testresults", "embedded")
@@ -123,7 +124,7 @@ def get_timestamp(text):
stop_all = True
raise
startpos += len(prefix)
- text = text[startpos : startpos + 80]
+ text = text[startpos: startpos + 80]
ts = text[:19]
ts = re.sub(r'[^0-9]', '_', ts)
# check that it is a valid time stamp
@@ -152,7 +153,7 @@ def write_data(name, text):
offset = line.index("BEGIN_FILE")
if "END_FILE" in line:
stop = idx
- lines = lines[start : stop]
+ lines = lines[start: stop]
if offset:
lines = list(line[offset:] for line in lines)
# fix the lines - the original has no empty line after "# eof"
@@ -226,7 +227,7 @@ def handle_suburl_tup(idx_n_url_level):
return # bad solution, but it stops fast
idx, n, url, level = idx_n_url_level
try:
- ret = handle_suburl(idx, n, url, level)
+ handle_suburl(idx, n, url, level)
return url, None
except requests.exceptions.RequestException as e:
return url, e
@@ -276,7 +277,6 @@ def handle_topurl(url):
with open(cache_file, 'r') as fp:
known_urls = json.load(fp)
work_urls -= set(known_urls)
- level = 1
for sub_url in work_urls:
name = get_name(sub_url)
if name.endswith("/"):
diff --git a/sources/shiboken6/libshiboken/embed/embedding_generator.py b/sources/shiboken6/libshiboken/embed/embedding_generator.py
index 51c46ce54..3f790105c 100644
--- a/sources/shiboken6/libshiboken/embed/embedding_generator.py
+++ b/sources/shiboken6/libshiboken/embed/embedding_generator.py
@@ -39,7 +39,7 @@ assert (build_script_dir / "build_scripts").exists()
sys.path.insert(0, os.fspath(build_script_dir))
-from build_scripts import utils
+from build_scripts import utils # noqa: E402
def runpy(cmd, **kw):
@@ -157,7 +157,7 @@ def _embed_bytefile(fin, fout, is_text):
* {remark}.
*/
"""), file=fout)
- headsize = ( 0 if is_text else
+ headsize = (0 if is_text else
16 if sys.version_info >= (3, 7) else 12 if sys.version_info >= (3, 3) else 8)
binstr = fin.read()[headsize:]
if is_text:
@@ -194,7 +194,7 @@ def _embed_bytefile(fin, fout, is_text):
print(file=fout)
use_ord = sys.version_info[0] == 2
for i in range(0, len(binstr), 16):
- for c in bytes(binstr[i : i + 16]):
+ for c in bytes(binstr[i: i + 16]):
ord_c = ord(c) if use_ord else c
print(f"{ord_c:#4},", file=fout, end="")
print(file=fout)
diff --git a/sources/shiboken6/tests/shiboken_paths.py b/sources/shiboken6/tests/shiboken_paths.py
index 54b284ef6..614be8736 100644
--- a/sources/shiboken6/tests/shiboken_paths.py
+++ b/sources/shiboken6/tests/shiboken_paths.py
@@ -29,7 +29,6 @@ def get_build_dir():
look_for = Path("testing")
here = Path(__file__).resolve().parent
while here / look_for not in here.iterdir():
- import pprint
parent = here.parent
if parent == here:
raise SystemError(look_for + " not found!")
@@ -91,7 +90,7 @@ def shiboken_paths(include_shiboken_tests=False):
shiboken_dir = Path(get_build_dir()) / 'shiboken6'
lib_dirs = [os.fspath(shiboken_dir / 'libshiboken')]
if include_shiboken_tests:
- shiboken_test_dir = shiboken_dir /'tests'
+ shiboken_test_dir = shiboken_dir / 'tests'
for module in ['minimal', 'sample', 'smart', 'other']:
module_dir = shiboken_test_dir / f"{module}binding"
python_dirs.append(os.fspath(module_dir))