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
This commit is contained in:
parent
c31f2683cc
commit
2d1aee8595
@ -5,7 +5,7 @@ coverage:
|
||||
pytest --cov .
|
||||
|
||||
flake8:
|
||||
flake8 *.py --ignore=E501,E266,W503
|
||||
flake8 *.py --ignore=E501,E266,E203,W503
|
||||
|
||||
pytest:
|
||||
pytest
|
||||
|
@ -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
|
||||
|
@ -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"):
|
||||
|
Loading…
Reference in New Issue
Block a user