summaryrefslogtreecommitdiffstats
path: root/repo
diff options
context:
space:
mode:
authorGavin Mak <gavinmak@google.com>2023-03-11 06:46:20 +0000
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-03-22 17:46:28 +0000
commitea2e330e43c182dc16b0111ebc69ee5a71ee4ce1 (patch)
treedc33ba0e56825b3e007d0589891756724725a465 /repo
parent1604cf255f8c1786a23388db6d5277ac7949a24a (diff)
downloadgit-repo-ea2e330e43c182dc16b0111ebc69ee5a71ee4ce1.tar.gz
Format codebase with black and check formatting in CQ
Apply rules set by https://gerrit-review.googlesource.com/c/git-repo/+/362954/ across the codebase and fix any lingering errors caught by flake8. Also check black formatting in run_tests (and CQ). Bug: b/267675342 Change-Id: I972d77649dac351150dcfeb1cd1ad0ea2efc1956 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/363474 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
Diffstat (limited to 'repo')
-rwxr-xr-xrepo18
1 files changed, 9 insertions, 9 deletions
diff --git a/repo b/repo
index ce3df054..c32e52da 100755
--- a/repo
+++ b/repo
@@ -506,10 +506,10 @@ def gitc_parse_clientdir(gitc_fs_path):
506 """Parse a path in the GITC FS and return its client name. 506 """Parse a path in the GITC FS and return its client name.
507 507
508 Args: 508 Args:
509 gitc_fs_path: A subdirectory path within the GITC_FS_ROOT_DIR. 509 gitc_fs_path: A subdirectory path within the GITC_FS_ROOT_DIR.
510 510
511 Returns: 511 Returns:
512 The GITC client name. 512 The GITC client name.
513 """ 513 """
514 if gitc_fs_path == GITC_FS_ROOT_DIR: 514 if gitc_fs_path == GITC_FS_ROOT_DIR:
515 return None 515 return None
@@ -942,14 +942,14 @@ def resolve_repo_rev(cwd, committish):
942 * xxx: Branch or tag or commit. 942 * xxx: Branch or tag or commit.
943 943
944 Args: 944 Args:
945 cwd: The git checkout to run in. 945 cwd: The git checkout to run in.
946 committish: The REPO_REV argument to resolve. 946 committish: The REPO_REV argument to resolve.
947 947
948 Returns: 948 Returns:
949 A tuple of (remote ref, commit) as makes sense for the committish. 949 A tuple of (remote ref, commit) as makes sense for the committish.
950 For branches, this will look like ('refs/heads/stable', <revision>). 950 For branches, this will look like ('refs/heads/stable', <revision>).
951 For tags, this will look like ('refs/tags/v1.0', <revision>). 951 For tags, this will look like ('refs/tags/v1.0', <revision>).
952 For commits, this will be (<revision>, <revision>). 952 For commits, this will be (<revision>, <revision>).
953 """ 953 """
954 def resolve(committish): 954 def resolve(committish):
955 ret = run_git('rev-parse', '--verify', '%s^{commit}' % (committish,), 955 ret = run_git('rev-parse', '--verify', '%s^{commit}' % (committish,),
@@ -1104,7 +1104,7 @@ class Requirements(object):
1104 """Initialize. 1104 """Initialize.
1105 1105
1106 Args: 1106 Args:
1107 requirements: A dictionary of settings. 1107 requirements: A dictionary of settings.
1108 """ 1108 """
1109 self.requirements = requirements 1109 self.requirements = requirements
1110 1110