From a9f1bed922bde81e83386017ef16ceeb6992476d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Sep 2023 14:12:51 +0200 Subject: [PATCH] build/python/cmake: add cast to fix mypy warning --- python/build/cmake.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/cmake.py b/python/build/cmake.py index 1971a6cd8..3b7e86405 100644 --- a/python/build/cmake.py +++ b/python/build/cmake.py @@ -1,7 +1,7 @@ import os import re import subprocess -from typing import Optional, Sequence, TextIO, Union +from typing import cast, Optional, Sequence, TextIO, Union from collections.abc import Mapping from build.project import Project @@ -59,7 +59,7 @@ def configure(toolchain: AnyToolchain, src: str, build: str, args: list[str]=[], cross_args = [] if toolchain.is_windows: - cross_args.append('-DCMAKE_RC_COMPILER=' + toolchain.windres) + cross_args.append('-DCMAKE_RC_COMPILER=' + cast(str, toolchain.windres)) # Several targets need a sysroot to prevent pkg-config from # looking for libraries on the build host (TODO: fix this