Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/cmake/cmake_static_check_clang_array.py')
-rw-r--r--build_files/cmake/cmake_static_check_clang_array.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/build_files/cmake/cmake_static_check_clang_array.py b/build_files/cmake/cmake_static_check_clang_array.py
index 59743f0244b..76aeb9e194e 100644
--- a/build_files/cmake/cmake_static_check_clang_array.py
+++ b/build_files/cmake/cmake_static_check_clang_array.py
@@ -25,6 +25,14 @@ import subprocess
import sys
import os
+from typing import (
+ Any,
+ Callable,
+ List,
+ Tuple,
+)
+
+
USE_QUIET = (os.environ.get("QUIET", None) is not None)
CHECKER_IGNORE_PREFIX = [
@@ -43,7 +51,7 @@ CHECKER_ARGS = [
]
-def main():
+def main() -> None:
source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX)
check_commands = []
@@ -52,18 +60,19 @@ def main():
# ~if "source/blender" not in c:
# ~ continue
- cmd = ([CHECKER_BIN] +
- CHECKER_ARGS +
- [c] +
- [("-I%s" % i) for i in inc_dirs] +
- [("-D%s" % d) for d in defs]
- )
+ cmd = (
+ [CHECKER_BIN] +
+ CHECKER_ARGS +
+ [c] +
+ [("-I%s" % i) for i in inc_dirs] +
+ [("-D%s" % d) for d in defs]
+ )
check_commands.append((c, cmd))
process_functions = []
- def my_process(i, c, cmd):
+ def my_process(i: int, c: str, cmd: str) -> subprocess.Popen[Any]:
if not USE_QUIET:
percent = 100.0 * (i / (len(check_commands) - 1))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"