mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-09-29 04:32:13 +08:00
isort: format codebase
Change-Id: I6f11d123b68fd077f558d3c21349c55c5f251019 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383715 Reviewed-by: Gavin Mak <gavinmak@google.com> Tested-by: Mike Frysinger <vapier@google.com> Commit-Queue: Mike Frysinger <vapier@google.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
import os
|
||||
|
||||
|
||||
# A mapping of the subcommand name to the class that implements it.
|
||||
all_commands = {}
|
||||
all_modules = []
|
||||
|
@@ -17,10 +17,12 @@ import functools
|
||||
import itertools
|
||||
import sys
|
||||
|
||||
from command import Command, DEFAULT_LOCAL_JOBS
|
||||
from command import Command
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
from error import RepoError
|
||||
from error import RepoExitError
|
||||
from git_command import git
|
||||
from progress import Progress
|
||||
from error import RepoError, RepoExitError
|
||||
|
||||
|
||||
class AbandonError(RepoExitError):
|
||||
|
@@ -16,7 +16,8 @@ import itertools
|
||||
import sys
|
||||
|
||||
from color import Coloring
|
||||
from command import Command, DEFAULT_LOCAL_JOBS
|
||||
from command import Command
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
|
||||
|
||||
class BranchColoring(Coloring):
|
||||
|
@@ -14,12 +14,14 @@
|
||||
|
||||
import functools
|
||||
import sys
|
||||
|
||||
from typing import NamedTuple
|
||||
from command import Command, DEFAULT_LOCAL_JOBS
|
||||
|
||||
from command import Command
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
from error import GitError
|
||||
from error import RepoExitError
|
||||
from progress import Progress
|
||||
from project import Project
|
||||
from error import GitError, RepoExitError
|
||||
|
||||
|
||||
class CheckoutBranchResult(NamedTuple):
|
||||
|
@@ -14,9 +14,11 @@
|
||||
|
||||
import re
|
||||
import sys
|
||||
|
||||
from command import Command
|
||||
from git_command import GitCommand
|
||||
from error import GitError
|
||||
from git_command import GitCommand
|
||||
|
||||
|
||||
CHANGE_ID_RE = re.compile(r"^\s*Change-Id: I([0-9a-f]{40})\s*$")
|
||||
|
||||
|
@@ -15,7 +15,8 @@
|
||||
import functools
|
||||
import io
|
||||
|
||||
from command import DEFAULT_LOCAL_JOBS, PagedCommand
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
from command import PagedCommand
|
||||
|
||||
|
||||
class Diff(PagedCommand):
|
||||
|
@@ -16,7 +16,10 @@ import re
|
||||
import sys
|
||||
|
||||
from command import Command
|
||||
from error import GitError, NoSuchProjectError, RepoExitError
|
||||
from error import GitError
|
||||
from error import NoSuchProjectError
|
||||
from error import RepoExitError
|
||||
|
||||
|
||||
CHANGE_RE = re.compile(r"^([1-9][0-9]*)(?:[/\.-]([1-9][0-9]*))?$")
|
||||
|
||||
|
@@ -16,21 +16,20 @@ import errno
|
||||
import functools
|
||||
import io
|
||||
import multiprocessing
|
||||
import re
|
||||
import os
|
||||
import re
|
||||
import signal
|
||||
import sys
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from color import Coloring
|
||||
from command import (
|
||||
DEFAULT_LOCAL_JOBS,
|
||||
Command,
|
||||
MirrorSafeCommand,
|
||||
WORKER_BATCH_SIZE,
|
||||
)
|
||||
from command import Command
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
from command import MirrorSafeCommand
|
||||
from command import WORKER_BATCH_SIZE
|
||||
from error import ManifestInvalidRevisionError
|
||||
|
||||
|
||||
_CAN_COLOR = [
|
||||
"branch",
|
||||
"diff",
|
||||
|
@@ -14,12 +14,15 @@
|
||||
|
||||
import functools
|
||||
import sys
|
||||
from typing import NamedTuple
|
||||
|
||||
from color import Coloring
|
||||
from command import DEFAULT_LOCAL_JOBS, PagedCommand
|
||||
from error import GitError, InvalidArgumentsError, SilentRepoExitError
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
from command import PagedCommand
|
||||
from error import GitError
|
||||
from error import InvalidArgumentsError
|
||||
from error import SilentRepoExitError
|
||||
from git_command import GitCommand
|
||||
from typing import NamedTuple
|
||||
from project import Project
|
||||
|
||||
|
||||
|
@@ -16,14 +16,12 @@ import re
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
from subcmds import all_commands
|
||||
from color import Coloring
|
||||
from command import (
|
||||
PagedCommand,
|
||||
MirrorSafeCommand,
|
||||
)
|
||||
from wrapper import Wrapper
|
||||
from command import MirrorSafeCommand
|
||||
from command import PagedCommand
|
||||
from error import RepoExitError
|
||||
from subcmds import all_commands
|
||||
from wrapper import Wrapper
|
||||
|
||||
|
||||
class InvalidHelpCommand(RepoExitError):
|
||||
|
@@ -14,9 +14,10 @@
|
||||
|
||||
import optparse
|
||||
|
||||
from command import PagedCommand
|
||||
from color import Coloring
|
||||
from git_refs import R_M, R_HEADS
|
||||
from command import PagedCommand
|
||||
from git_refs import R_HEADS
|
||||
from git_refs import R_M
|
||||
|
||||
|
||||
class _Coloring(Coloring):
|
||||
|
@@ -16,11 +16,15 @@ import os
|
||||
import sys
|
||||
|
||||
from color import Coloring
|
||||
from command import InteractiveCommand, MirrorSafeCommand
|
||||
from git_command import git_require, MIN_GIT_VERSION_SOFT, MIN_GIT_VERSION_HARD
|
||||
from wrapper import Wrapper
|
||||
from error import UpdateManifestError
|
||||
from command import InteractiveCommand
|
||||
from command import MirrorSafeCommand
|
||||
from error import RepoUnhandledExceptionError
|
||||
from error import UpdateManifestError
|
||||
from git_command import git_require
|
||||
from git_command import MIN_GIT_VERSION_HARD
|
||||
from git_command import MIN_GIT_VERSION_SOFT
|
||||
from wrapper import Wrapper
|
||||
|
||||
|
||||
_REPO_ALLOW_SHALLOW = os.environ.get("REPO_ALLOW_SHALLOW")
|
||||
|
||||
|
@@ -14,7 +14,8 @@
|
||||
|
||||
import os
|
||||
|
||||
from command import Command, MirrorSafeCommand
|
||||
from command import Command
|
||||
from command import MirrorSafeCommand
|
||||
|
||||
|
||||
class List(Command, MirrorSafeCommand):
|
||||
|
@@ -15,7 +15,8 @@
|
||||
import itertools
|
||||
|
||||
from color import Coloring
|
||||
from command import DEFAULT_LOCAL_JOBS, PagedCommand
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
from command import PagedCommand
|
||||
|
||||
|
||||
class Prune(PagedCommand):
|
||||
|
@@ -15,10 +15,11 @@
|
||||
import optparse
|
||||
import sys
|
||||
|
||||
from command import Command, MirrorSafeCommand
|
||||
from subcmds.sync import _PostRepoUpgrade
|
||||
from subcmds.sync import _PostRepoFetch
|
||||
from command import Command
|
||||
from command import MirrorSafeCommand
|
||||
from error import RepoExitError
|
||||
from subcmds.sync import _PostRepoFetch
|
||||
from subcmds.sync import _PostRepoUpgrade
|
||||
|
||||
|
||||
class SelfupdateError(RepoExitError):
|
||||
|
@@ -14,14 +14,15 @@
|
||||
|
||||
import functools
|
||||
import sys
|
||||
from typing import NamedTuple
|
||||
|
||||
from command import Command, DEFAULT_LOCAL_JOBS
|
||||
from git_config import IsImmutable
|
||||
from command import Command
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
from error import RepoExitError
|
||||
from git_command import git
|
||||
from git_config import IsImmutable
|
||||
from progress import Progress
|
||||
from project import Project
|
||||
from typing import NamedTuple
|
||||
from error import RepoExitError
|
||||
|
||||
|
||||
class ExecuteOneResult(NamedTuple):
|
||||
|
@@ -17,9 +17,9 @@ import glob
|
||||
import io
|
||||
import os
|
||||
|
||||
from command import DEFAULT_LOCAL_JOBS, PagedCommand
|
||||
|
||||
from color import Coloring
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
from command import PagedCommand
|
||||
import platform_utils
|
||||
|
||||
|
||||
|
@@ -25,13 +25,14 @@ import socket
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
from typing import NamedTuple, List, Set
|
||||
from typing import List, NamedTuple, Set
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
import xml.parsers.expat
|
||||
import xmlrpc.client
|
||||
|
||||
|
||||
try:
|
||||
import threading as _threading
|
||||
except ImportError:
|
||||
@@ -49,34 +50,35 @@ except ImportError:
|
||||
return (256, 256)
|
||||
|
||||
|
||||
from command import Command
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
from command import MirrorSafeCommand
|
||||
from command import WORKER_BATCH_SIZE
|
||||
from error import GitError
|
||||
from error import RepoChangedException
|
||||
from error import RepoExitError
|
||||
from error import RepoUnhandledExceptionError
|
||||
from error import SyncError
|
||||
from error import UpdateManifestError
|
||||
import event_log
|
||||
from git_command import git_require
|
||||
from git_config import GetUrlCookieFile
|
||||
from git_refs import R_HEADS, HEAD
|
||||
from git_refs import HEAD
|
||||
from git_refs import R_HEADS
|
||||
import git_superproject
|
||||
import platform_utils
|
||||
from progress import elapsed_str
|
||||
from progress import jobs_str
|
||||
from progress import Progress
|
||||
from project import DeleteWorktreeError
|
||||
from project import Project
|
||||
from project import RemoteSpec
|
||||
from command import (
|
||||
Command,
|
||||
DEFAULT_LOCAL_JOBS,
|
||||
MirrorSafeCommand,
|
||||
WORKER_BATCH_SIZE,
|
||||
)
|
||||
from error import (
|
||||
RepoChangedException,
|
||||
GitError,
|
||||
RepoExitError,
|
||||
SyncError,
|
||||
UpdateManifestError,
|
||||
RepoUnhandledExceptionError,
|
||||
)
|
||||
import platform_utils
|
||||
from project import SyncBuffer, DeleteWorktreeError
|
||||
from progress import Progress, elapsed_str, jobs_str
|
||||
from project import SyncBuffer
|
||||
from repo_trace import Trace
|
||||
import ssh
|
||||
from wrapper import Wrapper
|
||||
|
||||
|
||||
_ONE_DAY_S = 24 * 60 * 60
|
||||
|
||||
# Env var to implicitly turn auto-gc back on. This was added to allow a user to
|
||||
|
@@ -19,9 +19,12 @@ import re
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
from command import DEFAULT_LOCAL_JOBS, InteractiveCommand
|
||||
from command import DEFAULT_LOCAL_JOBS
|
||||
from command import InteractiveCommand
|
||||
from editor import Editor
|
||||
from error import UploadError, SilentRepoExitError, GitError
|
||||
from error import GitError
|
||||
from error import SilentRepoExitError
|
||||
from error import UploadError
|
||||
from git_command import GitCommand
|
||||
from git_refs import R_HEADS
|
||||
from hooks import RepoHook
|
||||
|
@@ -15,8 +15,11 @@
|
||||
import platform
|
||||
import sys
|
||||
|
||||
from command import Command, MirrorSafeCommand
|
||||
from git_command import git, RepoSourceVersion, user_agent
|
||||
from command import Command
|
||||
from command import MirrorSafeCommand
|
||||
from git_command import git
|
||||
from git_command import RepoSourceVersion
|
||||
from git_command import user_agent
|
||||
from git_refs import HEAD
|
||||
from wrapper import Wrapper
|
||||
|
||||
|
Reference in New Issue
Block a user