summaryrefslogtreecommitdiffstats
path: root/util/cmake/pro2cmake.py
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-01-29 15:36:21 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-01-29 14:42:03 +0000
commitccdc6c2dd3d4b7e7b6a06488c278e4c9f06e8925 (patch)
tree23f571dafea084de1612613029612e7d987a0cbe /util/cmake/pro2cmake.py
parent957007a9493a41064dcb83155e31ce52021db077 (diff)
pro2cmake: Fix flake and mypy issues
Change-Id: I33ab818c53f751ede7a7840b1086a3ae8263e109 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util/cmake/pro2cmake.py')
-rwxr-xr-xutil/cmake/pro2cmake.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index f6017880c2..04443b00b7 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -599,7 +599,7 @@ class QmlDir:
qmldir_file.path = path
return qmldir_file
- def from_lines(self, lines: [str]):
+ def from_lines(self, lines: List[str]):
for line in lines:
self.handle_line(line)
@@ -3139,7 +3139,7 @@ def write_example(
"""
)
- if qml_dir != None:
+ if qml_dir is not None:
if qml_dir.designer_supported:
add_target += " DESIGNER_SUPPORTED\n"
if len(qml_dir.classname) != 0:
@@ -3404,7 +3404,7 @@ def write_qml_plugin(
cm_fh.write("\n ".join(import_list))
cm_fh.write(f"\n )\nendif()\n\n")
- if qml_dir != None:
+ if qml_dir is not None:
if qml_dir.designer_supported:
extra_lines.append("DESIGNER_SUPPORTED")
if len(qml_dir.classname) != 0:
@@ -3516,7 +3516,7 @@ def handle_app_or_lib(
# Generate qmltypes instruction for anything that may have CONFIG += qmltypes
# that is not a qml plugin
- if "qmltypes" in scope.get("CONFIG") and not "qml_plugin" in scope.get("_LOADED"):
+ if "qmltypes" in scope.get("CONFIG") and "qml_plugin" not in scope.get("_LOADED"):
cm_fh.write(f"\n{spaces(indent)}set_target_properties({target} PROPERTIES\n")
cm_fh.write(f"{spaces(indent+1)}QT_QML_MODULE_INSTALL_QMLTYPES TRUE\n")
@@ -3531,7 +3531,7 @@ def handle_app_or_lib(
raise RuntimeError(f"No QML_IMPORT_VERSION info found for target {target}.")
if not import_minor_version:
- import_minor_version = 0
+ import_minor_version = str(0)
import_version = f"{import_major_version}.{import_minor_version}"
if import_version: