From ac95326ad46fbff310ad25baaf96262d851509c1 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 29 Apr 2021 15:40:44 +0200 Subject: [PATCH] uic/Python: Add comments for mypy to ignore star imports Amends 2f975b39a967cd2ac1c234a200eb6b9c11d8b5b2. Pick-to: 6.1 5.15 Fixes: PYSIDE-1404 Change-Id: I534d78bdf44eb02bf80831a3d6c1d080a4e08698 Reviewed-by: Christian Tismer Reviewed-by: Cristian Maureira-Fredes --- src/tools/uic/python/pythonwriteimports.cpp | 6 +++--- tests/auto/tools/uic/baseline/config.ui.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/uic/python/pythonwriteimports.cpp b/src/tools/uic/python/pythonwriteimports.cpp index 6f4a4e6f4f..6dab354a60 100644 --- a/src/tools/uic/python/pythonwriteimports.cpp +++ b/src/tools/uic/python/pythonwriteimports.cpp @@ -40,9 +40,9 @@ QT_BEGIN_NAMESPACE static QString standardImports() { - return QString::fromLatin1(R"I(from PySide%1.QtCore import * -from PySide%1.QtGui import * -from PySide%1.QtWidgets import * + return QString::fromLatin1(R"I(from PySide%1.QtCore import * # type: ignore +from PySide%1.QtGui import * # type: ignore +from PySide%1.QtWidgets import * # type: ignore )I").arg(QT_VERSION_MAJOR); } diff --git a/tests/auto/tools/uic/baseline/config.ui.py b/tests/auto/tools/uic/baseline/config.ui.py index 961c2cebd6..d697ee622b 100644 --- a/tests/auto/tools/uic/baseline/config.ui.py +++ b/tests/auto/tools/uic/baseline/config.ui.py @@ -36,9 +36,9 @@ ## WARNING! All changes made in this file will be lost when recompiling UI file! ################################################################################ -from PySide6.QtCore import * -from PySide6.QtGui import * -from PySide6.QtWidgets import * +from PySide6.QtCore import * # type: ignore +from PySide6.QtGui import * # type: ignore +from PySide6.QtWidgets import * # type: ignore from gammaview import GammaView