diff --git a/aqt/archives.py b/aqt/archives.py index 413473e..7c4dcf1 100644 --- a/aqt/archives.py +++ b/aqt/archives.py @@ -31,11 +31,13 @@ from aqt.exceptions import ArchiveDownloadError, ArchiveListError, ChecksumDownl from aqt.helper import Settings, get_hash, getUrl, ssplit from aqt.metadata import QtRepoProperty, Version + @dataclass class UpdateXmls: target_folder: str xml_text: str + @dataclass class TargetConfig: version: str @@ -409,19 +411,14 @@ class QtArchives: if self.version >= Version("6.8.0"): arch = self.arch if self.os_name == "windows": - arch = self.arch.replace("win64_", "", 1) + arch = self.arch.replace("win64_", "", 1) elif self.os_name == "linux": arch = "x86_64" elif self.os_name == "linux_arm64": arch = "arm64" for ext in ["qtwebengine", "qtpdf"]: extensions_target_folder = posixpath.join( - "online/qtsdkrepository", - os_name, - "extensions", - ext, - self._version_str(), - arch + "online/qtsdkrepository", os_name, "extensions", ext, self._version_str(), arch ) extensions_xml_url = posixpath.join(extensions_target_folder, "Updates.xml") extensions_xml_text = self._download_update_xml(extensions_xml_url) diff --git a/aqt/metadata.py b/aqt/metadata.py index 70e4fe3..f1f563e 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -244,7 +244,7 @@ class ArchiveId: def to_extension_folder(self, module, version, arch) -> str: extarch = arch if self.host == "windows": - extarch = arch.replace("win64_", "", 1) + extarch = arch.replace("win64_", "", 1) elif self.host == "linux": extarch = "x86_64" elif self.host == "linux_arm64": @@ -929,14 +929,7 @@ class MetadataFactory: # Examples: extensions.qtwebengine.680.debug_information # extensions.qtwebengine.680.win64_msvc2022_64 - ext_pattern = re.compile( - r"^extensions\." - + r"(?P[^.]+)\." - + qt_ver_str - + r"\." - + arch - + r"$" - ) + ext_pattern = re.compile(r"^extensions\." + r"(?P[^.]+)\." + qt_ver_str + r"\." + arch + r"$") if version >= Version("6.8.0"): for ext in self.fetch_extensions(): ext_meta = self._fetch_extension_metadata(self.archive_id.to_extension_folder(ext, qt_ver_str, arch))