diff options
author | David Pursehouse <dpursehouse@collab.net> | 2020-02-12 14:58:39 +0900 |
---|---|---|
committer | David Pursehouse <dpursehouse@collab.net> | 2020-02-12 06:36:22 +0000 |
commit | abdf7500612f1d115863ba8f026ddbea1e5a1f28 (patch) | |
tree | 2b87f056bdf4fb53a170fc9121c2f5d1557bb48f /subcmds/forall.py | |
parent | 0ab95ba6d010abe5d615fa070e404582aca1d90a (diff) | |
download | git-repo-abdf7500612f1d115863ba8f026ddbea1e5a1f28.tar.gz |
Fix indentation issues reported by flake8
- E121 continuation line under-indented for hanging indent
- E122 continuation line missing indentation or outdented
- E125 continuation line with same indent as next logical line
- E126 continuation line over-indented for hanging indent
- E127 continuation line over-indented for visual indent
- E128 continuation line under-indented for visual indent
- E129 visually indented line with same indent as next logical line
- E131 continuation line unaligned for hanging indent
Fixed automatically with autopep8:
git ls-files | grep py$ | xargs autopep8 --in-place \
--select E121,E122,E125,E126,E127,E128,E129,E131
Change-Id: Ifd95fb8e6a1a4d6e9de187b5787d64a6326dd249
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254605
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: David Pursehouse <dpursehouse@collab.net>
Diffstat (limited to 'subcmds/forall.py')
-rw-r--r-- | subcmds/forall.py | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py index 97067605..5d2be91f 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py | |||
@@ -28,10 +28,10 @@ from command import Command, MirrorSafeCommand | |||
28 | import platform_utils | 28 | import platform_utils |
29 | 29 | ||
30 | _CAN_COLOR = [ | 30 | _CAN_COLOR = [ |
31 | 'branch', | 31 | 'branch', |
32 | 'diff', | 32 | 'diff', |
33 | 'grep', | 33 | 'grep', |
34 | 'log', | 34 | 'log', |
35 | ] | 35 | ] |
36 | 36 | ||
37 | 37 | ||
@@ -170,14 +170,14 @@ without iterating through the remaining projects. | |||
170 | else: | 170 | else: |
171 | lrev = None | 171 | lrev = None |
172 | return { | 172 | return { |
173 | 'name': project.name, | 173 | 'name': project.name, |
174 | 'relpath': project.relpath, | 174 | 'relpath': project.relpath, |
175 | 'remote_name': project.remote.name, | 175 | 'remote_name': project.remote.name, |
176 | 'lrev': lrev, | 176 | 'lrev': lrev, |
177 | 'rrev': project.revisionExpr, | 177 | 'rrev': project.revisionExpr, |
178 | 'annotations': dict((a.name, a.value) for a in project.annotations), | 178 | 'annotations': dict((a.name, a.value) for a in project.annotations), |
179 | 'gitdir': project.gitdir, | 179 | 'gitdir': project.gitdir, |
180 | 'worktree': project.worktree, | 180 | 'worktree': project.worktree, |
181 | } | 181 | } |
182 | 182 | ||
183 | def ValidateOptions(self, opt, args): | 183 | def ValidateOptions(self, opt, args): |
@@ -196,8 +196,8 @@ without iterating through the remaining projects. | |||
196 | cmd.extend(opt.command[1:]) | 196 | cmd.extend(opt.command[1:]) |
197 | 197 | ||
198 | if opt.project_header \ | 198 | if opt.project_header \ |
199 | and not shell \ | 199 | and not shell \ |
200 | and cmd[0] == 'git': | 200 | and cmd[0] == 'git': |
201 | # If this is a direct git command that can enable colorized | 201 | # If this is a direct git command that can enable colorized |
202 | # output and the user prefers coloring, add --color into the | 202 | # output and the user prefers coloring, add --color into the |
203 | # command line because we are going to wrap the command into | 203 | # command line because we are going to wrap the command into |
@@ -220,7 +220,7 @@ without iterating through the remaining projects. | |||
220 | 220 | ||
221 | smart_sync_manifest_name = "smart_sync_override.xml" | 221 | smart_sync_manifest_name = "smart_sync_override.xml" |
222 | smart_sync_manifest_path = os.path.join( | 222 | smart_sync_manifest_path = os.path.join( |
223 | self.manifest.manifestProject.worktree, smart_sync_manifest_name) | 223 | self.manifest.manifestProject.worktree, smart_sync_manifest_name) |
224 | 224 | ||
225 | if os.path.isfile(smart_sync_manifest_path): | 225 | if os.path.isfile(smart_sync_manifest_path): |
226 | self.manifest.Override(smart_sync_manifest_path) | 226 | self.manifest.Override(smart_sync_manifest_path) |
@@ -238,8 +238,8 @@ without iterating through the remaining projects. | |||
238 | try: | 238 | try: |
239 | config = self.manifest.manifestProject.config | 239 | config = self.manifest.manifestProject.config |
240 | results_it = pool.imap( | 240 | results_it = pool.imap( |
241 | DoWorkWrapper, | 241 | DoWorkWrapper, |
242 | self.ProjectArgs(projects, mirror, opt, cmd, shell, config)) | 242 | self.ProjectArgs(projects, mirror, opt, cmd, shell, config)) |
243 | pool.close() | 243 | pool.close() |
244 | for r in results_it: | 244 | for r in results_it: |
245 | rc = rc or r | 245 | rc = rc or r |
@@ -253,7 +253,7 @@ without iterating through the remaining projects. | |||
253 | except Exception as e: | 253 | except Exception as e: |
254 | # Catch any other exceptions raised | 254 | # Catch any other exceptions raised |
255 | print('Got an error, terminating the pool: %s: %s' % | 255 | print('Got an error, terminating the pool: %s: %s' % |
256 | (type(e).__name__, e), | 256 | (type(e).__name__, e), |
257 | file=sys.stderr) | 257 | file=sys.stderr) |
258 | pool.terminate() | 258 | pool.terminate() |
259 | rc = rc or getattr(e, 'errno', 1) | 259 | rc = rc or getattr(e, 'errno', 1) |
@@ -268,7 +268,7 @@ without iterating through the remaining projects. | |||
268 | project = self._SerializeProject(p) | 268 | project = self._SerializeProject(p) |
269 | except Exception as e: | 269 | except Exception as e: |
270 | print('Project list error on project %s: %s: %s' % | 270 | print('Project list error on project %s: %s: %s' % |
271 | (p.name, type(e).__name__, e), | 271 | (p.name, type(e).__name__, e), |
272 | file=sys.stderr) | 272 | file=sys.stderr) |
273 | return | 273 | return |
274 | except KeyboardInterrupt: | 274 | except KeyboardInterrupt: |
@@ -331,7 +331,7 @@ def DoWork(project, mirror, opt, cmd, shell, cnt, config): | |||
331 | if opt.ignore_missing: | 331 | if opt.ignore_missing: |
332 | return 0 | 332 | return 0 |
333 | if ((opt.project_header and opt.verbose) | 333 | if ((opt.project_header and opt.verbose) |
334 | or not opt.project_header): | 334 | or not opt.project_header): |
335 | print('skipping %s/' % project['relpath'], file=sys.stderr) | 335 | print('skipping %s/' % project['relpath'], file=sys.stderr) |
336 | return 1 | 336 | return 1 |
337 | 337 | ||