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:
authorCampbell Barton <campbell@blender.org>2022-04-20 08:08:46 +0300
committerCampbell Barton <campbell@blender.org>2022-04-20 08:08:46 +0300
commitdf3316cbe98e19def7284c028e53682db0be9a30 (patch)
tree54fff92a80bfd635ca439c2e4f258843c5cf27cb /build_files/cmake
parent972a697f822b65cc1887c305dd62e54d5b19d3e3 (diff)
Cleanup: run autopep8 on build_files/
Replace multiple hashes with over-lines for make_source_archive.py.
Diffstat (limited to 'build_files/cmake')
-rw-r--r--build_files/cmake/clang_array_check.py6
-rw-r--r--build_files/cmake/project_source_info.py7
2 files changed, 6 insertions, 7 deletions
diff --git a/build_files/cmake/clang_array_check.py b/build_files/cmake/clang_array_check.py
index b015c5c6e7c..db9fd2d57a4 100644
--- a/build_files/cmake/clang_array_check.py
+++ b/build_files/cmake/clang_array_check.py
@@ -202,9 +202,9 @@ def parm_size(node_child):
# NOT PERFECT CODE, EXTRACT SIZE FROM TOKENS
if len(tokens) >= 3: # foo [ 1 ]
- if ((tokens[-3].kind == TokenKind.PUNCTUATION and tokens[-3].spelling == "[") and
- (tokens[-2].kind == TokenKind.LITERAL and tokens[-2].spelling.isdigit()) and
- (tokens[-1].kind == TokenKind.PUNCTUATION and tokens[-1].spelling == "]")):
+ if ((tokens[-3].kind == TokenKind.PUNCTUATION and tokens[-3].spelling == "[") and
+ (tokens[-2].kind == TokenKind.LITERAL and tokens[-2].spelling.isdigit()) and
+ (tokens[-1].kind == TokenKind.PUNCTUATION and tokens[-1].spelling == "]")):
# ---
return int(tokens[-2].spelling)
return -1
diff --git a/build_files/cmake/project_source_info.py b/build_files/cmake/project_source_info.py
index 1479d62e6c5..7a00f756e03 100644
--- a/build_files/cmake/project_source_info.py
+++ b/build_files/cmake/project_source_info.py
@@ -114,12 +114,11 @@ def makefile_log() -> List[str]:
print("Can't execute process")
sys.exit(1)
-
while process.poll():
time.sleep(1)
# We know this is always true based on the input arguments to `Popen`.
- stdout: IO[bytes] = process.stdout # type: ignore
+ stdout: IO[bytes] = process.stdout # type: ignore
out = stdout.read()
stdout.close()
@@ -210,7 +209,7 @@ def build_defines_as_source() -> str:
)
# We know this is always true based on the input arguments to `Popen`.
- stdout: IO[bytes] = process.stdout # type: ignore
+ stdout: IO[bytes] = process.stdout # type: ignore
return cast(str, stdout.read().strip().decode('ascii'))
@@ -228,7 +227,7 @@ def build_defines_as_args() -> List[str]:
def queue_processes(
process_funcs: Sequence[Tuple[Callable[..., subprocess.Popen[Any]], Tuple[Any, ...]]],
*,
- job_total: int =-1,
+ job_total: int = -1,
sleep: float = 0.1,
) -> None:
""" Takes a list of function arg pairs, each function must return a process