diff options
| author | David Pursehouse <dpursehouse@collab.net> | 2020-02-12 13:56:59 +0900 |
|---|---|---|
| committer | David Pursehouse <dpursehouse@collab.net> | 2020-02-12 05:17:08 +0000 |
| commit | e5913ae41058ddd7f692e9cc18e5f71b8251bd60 (patch) | |
| tree | 94f099a0290d28da431ceaefa68ab00c6ac90b8d /subcmds | |
| parent | 119085e6b180b513f7976f91fe56ead11a125d4b (diff) | |
| download | git-repo-e5913ae41058ddd7f692e9cc18e5f71b8251bd60.tar.gz | |
Fix flake8 E251 unexpected spaces around keyword / parameter equals
Fixed automatically with autopep8:
git ls-files | grep py$ | xargs autopep8 --in-place --select E251
Change-Id: I58009e1c8c91c39745d559ac919be331d4cd9e77
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254598
Tested-by: David Pursehouse <dpursehouse@collab.net>
Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds')
| -rw-r--r-- | subcmds/cherry_pick.py | 14 | ||||
| -rw-r--r-- | subcmds/diffmanifests.py | 8 | ||||
| -rw-r--r-- | subcmds/info.py | 10 | ||||
| -rw-r--r-- | subcmds/manifest.py | 4 | ||||
| -rw-r--r-- | subcmds/selfupdate.py | 4 | ||||
| -rw-r--r-- | subcmds/status.py | 4 | ||||
| -rw-r--r-- | subcmds/sync.py | 30 | ||||
| -rw-r--r-- | subcmds/upload.py | 8 |
8 files changed, 41 insertions, 41 deletions
diff --git a/subcmds/cherry_pick.py b/subcmds/cherry_pick.py index a541a040..bd396fab 100644 --- a/subcmds/cherry_pick.py +++ b/subcmds/cherry_pick.py | |||
| @@ -46,8 +46,8 @@ change id will be added. | |||
| 46 | 46 | ||
| 47 | p = GitCommand(None, | 47 | p = GitCommand(None, |
| 48 | ['rev-parse', '--verify', reference], | 48 | ['rev-parse', '--verify', reference], |
| 49 | capture_stdout = True, | 49 | capture_stdout=True, |
| 50 | capture_stderr = True) | 50 | capture_stderr=True) |
| 51 | if p.Wait() != 0: | 51 | if p.Wait() != 0: |
| 52 | print(p.stderr, file=sys.stderr) | 52 | print(p.stderr, file=sys.stderr) |
| 53 | sys.exit(1) | 53 | sys.exit(1) |
| @@ -61,8 +61,8 @@ change id will be added. | |||
| 61 | 61 | ||
| 62 | p = GitCommand(None, | 62 | p = GitCommand(None, |
| 63 | ['cherry-pick', sha1], | 63 | ['cherry-pick', sha1], |
| 64 | capture_stdout = True, | 64 | capture_stdout=True, |
| 65 | capture_stderr = True) | 65 | capture_stderr=True) |
| 66 | status = p.Wait() | 66 | status = p.Wait() |
| 67 | 67 | ||
| 68 | print(p.stdout, file=sys.stdout) | 68 | print(p.stdout, file=sys.stdout) |
| @@ -74,9 +74,9 @@ change id will be added. | |||
| 74 | new_msg = self._Reformat(old_msg, sha1) | 74 | new_msg = self._Reformat(old_msg, sha1) |
| 75 | 75 | ||
| 76 | p = GitCommand(None, ['commit', '--amend', '-F', '-'], | 76 | p = GitCommand(None, ['commit', '--amend', '-F', '-'], |
| 77 | provide_stdin = True, | 77 | provide_stdin=True, |
| 78 | capture_stdout = True, | 78 | capture_stdout=True, |
| 79 | capture_stderr = True) | 79 | capture_stderr=True) |
| 80 | p.stdin.write(new_msg) | 80 | p.stdin.write(new_msg) |
| 81 | p.stdin.close() | 81 | p.stdin.close() |
| 82 | if p.Wait() != 0: | 82 | if p.Wait() != 0: |
diff --git a/subcmds/diffmanifests.py b/subcmds/diffmanifests.py index b999699e..9bdb5e14 100644 --- a/subcmds/diffmanifests.py +++ b/subcmds/diffmanifests.py | |||
| @@ -184,10 +184,10 @@ synced and their revisions won't be found. | |||
| 184 | self.out = _Coloring(self.manifest.globalConfig) | 184 | self.out = _Coloring(self.manifest.globalConfig) |
| 185 | self.printText = self.out.nofmt_printer('text') | 185 | self.printText = self.out.nofmt_printer('text') |
| 186 | if opt.color: | 186 | if opt.color: |
| 187 | self.printProject = self.out.nofmt_printer('project', attr = 'bold') | 187 | self.printProject = self.out.nofmt_printer('project', attr='bold') |
| 188 | self.printAdded = self.out.nofmt_printer('green', fg = 'green', attr = 'bold') | 188 | self.printAdded = self.out.nofmt_printer('green', fg='green', attr='bold') |
| 189 | self.printRemoved = self.out.nofmt_printer('red', fg = 'red', attr = 'bold') | 189 | self.printRemoved = self.out.nofmt_printer('red', fg='red', attr='bold') |
| 190 | self.printRevision = self.out.nofmt_printer('revision', fg = 'yellow') | 190 | self.printRevision = self.out.nofmt_printer('revision', fg='yellow') |
| 191 | else: | 191 | else: |
| 192 | self.printProject = self.printAdded = self.printRemoved = self.printRevision = self.printText | 192 | self.printProject = self.printAdded = self.printRemoved = self.printRevision = self.printText |
| 193 | 193 | ||
diff --git a/subcmds/info.py b/subcmds/info.py index a9ad52aa..cff97fbd 100644 --- a/subcmds/info.py +++ b/subcmds/info.py | |||
| @@ -44,12 +44,12 @@ class Info(PagedCommand): | |||
| 44 | 44 | ||
| 45 | def Execute(self, opt, args): | 45 | def Execute(self, opt, args): |
| 46 | self.out = _Coloring(self.manifest.globalConfig) | 46 | self.out = _Coloring(self.manifest.globalConfig) |
| 47 | self.heading = self.out.printer('heading', attr = 'bold') | 47 | self.heading = self.out.printer('heading', attr='bold') |
| 48 | self.headtext = self.out.nofmt_printer('headtext', fg = 'yellow') | 48 | self.headtext = self.out.nofmt_printer('headtext', fg='yellow') |
| 49 | self.redtext = self.out.printer('redtext', fg = 'red') | 49 | self.redtext = self.out.printer('redtext', fg='red') |
| 50 | self.sha = self.out.printer("sha", fg = 'yellow') | 50 | self.sha = self.out.printer("sha", fg='yellow') |
| 51 | self.text = self.out.nofmt_printer('text') | 51 | self.text = self.out.nofmt_printer('text') |
| 52 | self.dimtext = self.out.printer('dimtext', attr = 'dim') | 52 | self.dimtext = self.out.printer('dimtext', attr='dim') |
| 53 | 53 | ||
| 54 | self.opt = opt | 54 | self.opt = opt |
| 55 | 55 | ||
diff --git a/subcmds/manifest.py b/subcmds/manifest.py index 9c1b3f0c..6bb01045 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py | |||
| @@ -66,8 +66,8 @@ in a Git repository for use during future 'repo init' invocations. | |||
| 66 | else: | 66 | else: |
| 67 | fd = open(opt.output_file, 'w') | 67 | fd = open(opt.output_file, 'w') |
| 68 | self.manifest.Save(fd, | 68 | self.manifest.Save(fd, |
| 69 | peg_rev = opt.peg_rev, | 69 | peg_rev=opt.peg_rev, |
| 70 | peg_rev_upstream = opt.peg_rev_upstream) | 70 | peg_rev_upstream=opt.peg_rev_upstream) |
| 71 | fd.close() | 71 | fd.close() |
| 72 | if opt.output_file != '-': | 72 | if opt.output_file != '-': |
| 73 | print('Saved manifest to %s' % opt.output_file, file=sys.stderr) | 73 | print('Saved manifest to %s' % opt.output_file, file=sys.stderr) |
diff --git a/subcmds/selfupdate.py b/subcmds/selfupdate.py index a8a09b64..b157e2f1 100644 --- a/subcmds/selfupdate.py +++ b/subcmds/selfupdate.py | |||
| @@ -59,5 +59,5 @@ need to be performed by an end-user. | |||
| 59 | 59 | ||
| 60 | rp.bare_git.gc('--auto') | 60 | rp.bare_git.gc('--auto') |
| 61 | _PostRepoFetch(rp, | 61 | _PostRepoFetch(rp, |
| 62 | no_repo_verify = opt.no_repo_verify, | 62 | no_repo_verify=opt.no_repo_verify, |
| 63 | verbose = True) | 63 | verbose=True) |
diff --git a/subcmds/status.py b/subcmds/status.py index 63972d72..6012ae24 100644 --- a/subcmds/status.py +++ b/subcmds/status.py | |||
| @@ -170,8 +170,8 @@ the following meanings: | |||
| 170 | class StatusColoring(Coloring): | 170 | class StatusColoring(Coloring): |
| 171 | def __init__(self, config): | 171 | def __init__(self, config): |
| 172 | Coloring.__init__(self, config, 'status') | 172 | Coloring.__init__(self, config, 'status') |
| 173 | self.project = self.printer('header', attr = 'bold') | 173 | self.project = self.printer('header', attr='bold') |
| 174 | self.untracked = self.printer('untracked', fg = 'red') | 174 | self.untracked = self.printer('untracked', fg='red') |
| 175 | 175 | ||
| 176 | orig_path = os.getcwd() | 176 | orig_path = os.getcwd() |
| 177 | try: | 177 | try: |
diff --git a/subcmds/sync.py b/subcmds/sync.py index 68ad88d5..13c419c3 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
| @@ -396,8 +396,8 @@ later is required to fix a server side protocol bug. | |||
| 396 | err_event=err_event, | 396 | err_event=err_event, |
| 397 | clone_filter=self.manifest.CloneFilter) | 397 | clone_filter=self.manifest.CloneFilter) |
| 398 | if self.jobs > 1: | 398 | if self.jobs > 1: |
| 399 | t = _threading.Thread(target = self._FetchProjectList, | 399 | t = _threading.Thread(target=self._FetchProjectList, |
| 400 | kwargs = kwargs) | 400 | kwargs=kwargs) |
| 401 | # Ensure that Ctrl-C will not freeze the repo process. | 401 | # Ensure that Ctrl-C will not freeze the repo process. |
| 402 | t.daemon = True | 402 | t.daemon = True |
| 403 | threads.add(t) | 403 | threads.add(t) |
| @@ -704,16 +704,16 @@ later is required to fix a server side protocol bug. | |||
| 704 | gitdir = os.path.join(self.manifest.topdir, path, '.git') | 704 | gitdir = os.path.join(self.manifest.topdir, path, '.git') |
| 705 | if os.path.exists(gitdir): | 705 | if os.path.exists(gitdir): |
| 706 | project = Project( | 706 | project = Project( |
| 707 | manifest = self.manifest, | 707 | manifest=self.manifest, |
| 708 | name = path, | 708 | name=path, |
| 709 | remote = RemoteSpec('origin'), | 709 | remote=RemoteSpec('origin'), |
| 710 | gitdir = gitdir, | 710 | gitdir=gitdir, |
| 711 | objdir = gitdir, | 711 | objdir=gitdir, |
| 712 | worktree = os.path.join(self.manifest.topdir, path), | 712 | worktree=os.path.join(self.manifest.topdir, path), |
| 713 | relpath = path, | 713 | relpath=path, |
| 714 | revisionExpr = 'HEAD', | 714 | revisionExpr='HEAD', |
| 715 | revisionId = None, | 715 | revisionId=None, |
| 716 | groups = None) | 716 | groups=None) |
| 717 | 717 | ||
| 718 | if project.IsDirty() and opt.force_remove_dirty: | 718 | if project.IsDirty() and opt.force_remove_dirty: |
| 719 | print('WARNING: Removing dirty project "%s": uncommitted changes ' | 719 | print('WARNING: Removing dirty project "%s": uncommitted changes ' |
| @@ -1100,9 +1100,9 @@ def _VerifyTag(project): | |||
| 1100 | 1100 | ||
| 1101 | cmd = [GIT, 'tag', '-v', cur] | 1101 | cmd = [GIT, 'tag', '-v', cur] |
| 1102 | proc = subprocess.Popen(cmd, | 1102 | proc = subprocess.Popen(cmd, |
| 1103 | stdout = subprocess.PIPE, | 1103 | stdout=subprocess.PIPE, |
| 1104 | stderr = subprocess.PIPE, | 1104 | stderr=subprocess.PIPE, |
| 1105 | env = env) | 1105 | env=env) |
| 1106 | out = proc.stdout.read() | 1106 | out = proc.stdout.read() |
| 1107 | proc.stdout.close() | 1107 | proc.stdout.close() |
| 1108 | 1108 | ||
diff --git a/subcmds/upload.py b/subcmds/upload.py index 25827c91..b81cf0a8 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
| @@ -441,14 +441,14 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
| 441 | def _GetMergeBranch(self, project): | 441 | def _GetMergeBranch(self, project): |
| 442 | p = GitCommand(project, | 442 | p = GitCommand(project, |
| 443 | ['rev-parse', '--abbrev-ref', 'HEAD'], | 443 | ['rev-parse', '--abbrev-ref', 'HEAD'], |
| 444 | capture_stdout = True, | 444 | capture_stdout=True, |
| 445 | capture_stderr = True) | 445 | capture_stderr=True) |
| 446 | p.Wait() | 446 | p.Wait() |
| 447 | local_branch = p.stdout.strip() | 447 | local_branch = p.stdout.strip() |
| 448 | p = GitCommand(project, | 448 | p = GitCommand(project, |
| 449 | ['config', '--get', 'branch.%s.merge' % local_branch], | 449 | ['config', '--get', 'branch.%s.merge' % local_branch], |
| 450 | capture_stdout = True, | 450 | capture_stdout=True, |
| 451 | capture_stderr = True) | 451 | capture_stderr=True) |
| 452 | p.Wait() | 452 | p.Wait() |
| 453 | merge_branch = p.stdout.strip() | 453 | merge_branch = p.stdout.strip() |
| 454 | return merge_branch | 454 | return merge_branch |
