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:
Mike Frysinger
2023-08-21 21:20:32 -04:00
committed by LUCI
parent 06ddc8c50a
commit 6447733eb2
52 changed files with 281 additions and 144 deletions

View File

@@ -14,6 +14,7 @@
import os
# A mapping of the subcommand name to the class that implements it.
all_commands = {}
all_modules = []

View File

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

View File

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

View File

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

View File

@@ -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*$")

View File

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

View File

@@ -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]*))?$")

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -14,7 +14,8 @@
import os
from command import Command, MirrorSafeCommand
from command import Command
from command import MirrorSafeCommand
class List(Command, MirrorSafeCommand):

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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