From 6348c7d15a867294ca0c650794e2ad3eca681ba5 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Mon, 2 Jan 2023 22:07:49 -0500 Subject: [PATCH] =?UTF-8?q?[UPD]=C2=A0format=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/git/fork_project.py | 4 +++- script/git/fork_project_ERPLibre.py | 4 +++- script/git/git_change_remote.py | 4 +++- script/git/git_change_remote_https_to_git.py | 4 +++- script/git/git_diff_repo_manifest.py | 4 +++- script/git/git_merge_repo_manifest.py | 4 +++- script/git/git_repo_manifest.py | 4 +++- script/git/git_repo_update_group.py | 4 +++- script/git/git_show_code_diff_repo_manifest.py | 4 +++- script/git/git_update_repo.py | 11 ++++++++--- script/git/pull_request_ERPLibre.py | 4 +++- script/git/repo_remove_auto_install.py | 4 +++- .../repo_revert_git_diff_date_from_code_generator.py | 4 +++- script/git/tag_push_all.py | 4 +++- script/test/run_parallel_test.py | 2 +- 15 files changed, 48 insertions(+), 17 deletions(-) diff --git a/script/git/fork_project.py b/script/git/fork_project.py index 647d321..86fd746 100755 --- a/script/git/fork_project.py +++ b/script/git/fork_project.py @@ -7,7 +7,9 @@ import sys from git import Repo from retrying import retry # pip install retrying -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script import fork_github_repo diff --git a/script/git/fork_project_ERPLibre.py b/script/git/fork_project_ERPLibre.py index cb1e48c..0a1913f 100755 --- a/script/git/fork_project_ERPLibre.py +++ b/script/git/fork_project_ERPLibre.py @@ -7,7 +7,9 @@ import sys import git from git import Repo -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/git/git_change_remote.py b/script/git/git_change_remote.py index 26388f3..30de84e 100755 --- a/script/git/git_change_remote.py +++ b/script/git/git_change_remote.py @@ -7,7 +7,9 @@ import sys from git import Repo from retrying import retry # pip install retrying -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/git/git_change_remote_https_to_git.py b/script/git/git_change_remote_https_to_git.py index 2ac41c6..47c85aa 100755 --- a/script/git/git_change_remote_https_to_git.py +++ b/script/git/git_change_remote_https_to_git.py @@ -9,7 +9,9 @@ import sys from git import Repo -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/git/git_diff_repo_manifest.py b/script/git/git_diff_repo_manifest.py index 2c3e364..5234029 100755 --- a/script/git/git_diff_repo_manifest.py +++ b/script/git/git_diff_repo_manifest.py @@ -6,7 +6,9 @@ import sys from git import Repo -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/git/git_merge_repo_manifest.py b/script/git/git_merge_repo_manifest.py index caba170..699fb80 100755 --- a/script/git/git_merge_repo_manifest.py +++ b/script/git/git_merge_repo_manifest.py @@ -5,7 +5,9 @@ import logging import os import sys -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/git/git_repo_manifest.py b/script/git/git_repo_manifest.py index 773b36f..536eb4a 100755 --- a/script/git/git_repo_manifest.py +++ b/script/git/git_repo_manifest.py @@ -4,7 +4,9 @@ import logging import os import sys -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/git/git_repo_update_group.py b/script/git/git_repo_update_group.py index 30cd79b..4347a35 100755 --- a/script/git/git_repo_update_group.py +++ b/script/git/git_repo_update_group.py @@ -7,7 +7,9 @@ import sys import git from git import Repo -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/git/git_show_code_diff_repo_manifest.py b/script/git/git_show_code_diff_repo_manifest.py index 92684d2..cd2c871 100755 --- a/script/git/git_show_code_diff_repo_manifest.py +++ b/script/git/git_show_code_diff_repo_manifest.py @@ -9,7 +9,9 @@ from colorama import Fore, Style from git import Repo from git.exc import GitCommandError, NoSuchPathError -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/git/git_update_repo.py b/script/git/git_update_repo.py index 9fe648d..c2ef9d2 100755 --- a/script/git/git_update_repo.py +++ b/script/git/git_update_repo.py @@ -7,7 +7,9 @@ import sys from git import Repo # pip install gitpython from retrying import retry # pip install retrying -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool @@ -57,7 +59,10 @@ def main(): repo_path=config.dir, add_repo_root=False ) if config.start_at >= len(lst_repo): - raise Exception(f"Argument start_at need to be less then size of repo '{len(lst_repo)}'") + raise Exception( + "Argument start_at need to be less then size of repo" + f" '{len(lst_repo)}'" + ) lst_repo_organization = [ git_tool.get_transformed_repo_info_from_url( a.get("url"), @@ -68,7 +73,7 @@ def main(): revision=a.get("revision"), clone_depth=a.get("clone_depth"), ) - for a in lst_repo[config.start_at:] + for a in lst_repo[config.start_at :] ] i = 0 diff --git a/script/git/pull_request_ERPLibre.py b/script/git/pull_request_ERPLibre.py index 6aa21cf..5536764 100755 --- a/script/git/pull_request_ERPLibre.py +++ b/script/git/pull_request_ERPLibre.py @@ -4,7 +4,9 @@ import logging import os import sys -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/git/repo_remove_auto_install.py b/script/git/repo_remove_auto_install.py index 6fe92c5..84aa149 100755 --- a/script/git/repo_remove_auto_install.py +++ b/script/git/repo_remove_auto_install.py @@ -8,7 +8,9 @@ from pathlib import Path from git import Repo # pip install gitpython from git.exc import GitCommandError -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/git/repo_revert_git_diff_date_from_code_generator.py b/script/git/repo_revert_git_diff_date_from_code_generator.py index 4711abc..9d074e8 100755 --- a/script/git/repo_revert_git_diff_date_from_code_generator.py +++ b/script/git/repo_revert_git_diff_date_from_code_generator.py @@ -8,7 +8,9 @@ import sys import git from unidiff import PatchSet -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) logging.basicConfig( diff --git a/script/git/tag_push_all.py b/script/git/tag_push_all.py index 665eed6..462fada 100755 --- a/script/git/tag_push_all.py +++ b/script/git/tag_push_all.py @@ -8,7 +8,9 @@ from colorama import Fore, Style from git import Repo # pip install gitpython from retrying import retry # pip install retrying -new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) +new_path = os.path.normpath( + os.path.join(os.path.dirname(__file__), "..", "..") +) sys.path.append(new_path) from script.git.git_tool import GitTool diff --git a/script/test/run_parallel_test.py b/script/test/run_parallel_test.py index d54ff4d..07982de 100755 --- a/script/test/run_parallel_test.py +++ b/script/test/run_parallel_test.py @@ -11,9 +11,9 @@ import time import uuid from collections import deque from typing import Tuple -import git import aioshutil +import git from colorama import Fore logging.basicConfig(level=logging.DEBUG)