[UPD] format script

This commit is contained in:
Mathieu Benoit 2023-01-02 22:07:49 -05:00
parent 7ed6939907
commit 6348c7d15a
15 changed files with 48 additions and 17 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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(

View file

@ -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

View file

@ -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)