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/utils
parent972a697f822b65cc1887c305dd62e54d5b19d3e3 (diff)
Cleanup: run autopep8 on build_files/
Replace multiple hashes with over-lines for make_source_archive.py.
Diffstat (limited to 'build_files/utils')
-rwxr-xr-xbuild_files/utils/make_source_archive.py12
-rwxr-xr-xbuild_files/utils/make_update.py1
-rwxr-xr-xbuild_files/utils/make_utils.py6
3 files changed, 12 insertions, 7 deletions
diff --git a/build_files/utils/make_source_archive.py b/build_files/utils/make_source_archive.py
index e06be9d5ba7..befd6d84534 100755
--- a/build_files/utils/make_source_archive.py
+++ b/build_files/utils/make_source_archive.py
@@ -143,8 +143,8 @@ def packages_path(current_directory: Path, cli_args: Any) -> Optional[Path]:
return Path(relpath)
-
-### Manifest creation
+# -----------------------------------------------------------------------------
+# Manifest creation
def create_manifest(
@@ -195,7 +195,8 @@ def packages_to_manifest(outfile: TextIO, packages_dir: Path) -> None:
print(path, file=outfile)
-### Higher-level functions
+# -----------------------------------------------------------------------------
+# Higher-level functions
def create_tarball(
@@ -249,7 +250,8 @@ def cleanup(manifest: Path) -> None:
print("OK")
-## Low-level commands
+# -----------------------------------------------------------------------------
+# Low-level commands
def git_ls_files(directory: Path = Path(".")) -> Iterable[Path]:
@@ -265,7 +267,7 @@ def git_ls_files(directory: Path = Path(".")) -> Iterable[Path]:
yield path
-def git_command(*cli_args: Union[bytes, str, Path] ) -> Iterable[str]:
+def git_command(*cli_args: Union[bytes, str, Path]) -> Iterable[str]:
"""Generator, yields lines of output from a Git command."""
command = ("git", *cli_args)
diff --git a/build_files/utils/make_update.py b/build_files/utils/make_update.py
index 3701913bd5d..bf140812ebb 100755
--- a/build_files/utils/make_update.py
+++ b/build_files/utils/make_update.py
@@ -129,6 +129,7 @@ def svn_update(args, release_version):
call(svn_non_interactive + ["switch", svn_url + dirname, dirpath], exit_on_error=False)
call(svn_non_interactive + ["update", dirpath])
+
# Test if git repo can be updated.
def git_update_skip(args, check_remote_exists=True):
if make_utils.command_missing(args.git_command):
diff --git a/build_files/utils/make_utils.py b/build_files/utils/make_utils.py
index b1aab93d698..e4c676474b5 100755
--- a/build_files/utils/make_utils.py
+++ b/build_files/utils/make_utils.py
@@ -47,8 +47,10 @@ def check_output(cmd, exit_on_error=True):
def git_branch_exists(git_command, branch):
- return call([git_command, "rev-parse", "--verify", branch], exit_on_error=False, silent=True) == 0 or \
- call([git_command, "rev-parse", "--verify", "remotes/origin/" + branch], exit_on_error=False, silent=True) == 0
+ return (
+ call([git_command, "rev-parse", "--verify", branch], exit_on_error=False, silent=True) == 0 or
+ call([git_command, "rev-parse", "--verify", "remotes/origin/" + branch], exit_on_error=False, silent=True) == 0
+ )
def git_branch(git_command):