summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2019-10-10 17:05:59 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2019-10-11 07:49:20 +0000
commit2d1aee85958c7a3ea7e322c06f882185e40aa1ac (patch)
treef4e32a5e9176d3aee540e092a95a3bed6393166f /util
parentc31f2683cc84b29b0044ec258b0055f6e5be4944 (diff)
cmake scripts: minor cleanup
not in is considered easier to read and thus recommended (flake8) and avoid one temporary name that is never used. Adjust flake8 to be compatible with black formatting. Change-Id: Ia049adb2344f11b53c78574972f6d9d670f4e66d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'util')
-rw-r--r--util/cmake/Makefile2
-rw-r--r--util/cmake/condition_simplifier_cache.py2
-rwxr-xr-xutil/cmake/pro2cmake.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/util/cmake/Makefile b/util/cmake/Makefile
index 402e45b707..67affa0e95 100644
--- a/util/cmake/Makefile
+++ b/util/cmake/Makefile
@@ -5,7 +5,7 @@ coverage:
pytest --cov .
flake8:
- flake8 *.py --ignore=E501,E266,W503
+ flake8 *.py --ignore=E501,E266,E203,W503
pytest:
pytest
diff --git a/util/cmake/condition_simplifier_cache.py b/util/cmake/condition_simplifier_cache.py
index 6303ff828e..4afd91597b 100644
--- a/util/cmake/condition_simplifier_cache.py
+++ b/util/cmake/condition_simplifier_cache.py
@@ -142,7 +142,7 @@ def simplify_condition_memoize(f: Callable[[str], str]):
os.makedirs(os.path.dirname(cache_path), exist_ok=True)
# Create the file if it doesn't exist, but don't override
# it.
- with open(cache_path, "a") as temp_file_handle:
+ with open(cache_path, "a"):
pass
updated_cache = cache_file_content
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 0b814f432f..bcb145cb59 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -2979,7 +2979,7 @@ def handle_app_or_lib(
elif is_plugin:
assert not is_example
target = write_plugin(cm_fh, scope, indent=indent)
- elif is_lib and not "qt_module" in scope.get("_LOADED"):
+ elif is_lib and "qt_module" not in scope.get("_LOADED"):
assert not is_example
target = write_generic_library(cm_fh, scope, indent=indent)
elif is_lib or "qt_module" in scope.get("_LOADED"):