summaryrefslogtreecommitdiffstats
path: root/gitc_utils.py
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2020-02-12 15:20:19 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2020-02-12 06:36:40 +0000
commit819827a42ddb364f98c3a1a7eae2536dc54bc4cc (patch)
treefe6bdca5ff7e44d53595a6da76d2b56ea659eee1 /gitc_utils.py
parentabdf7500612f1d115863ba8f026ddbea1e5a1f28 (diff)
downloadgit-repo-819827a42ddb364f98c3a1a7eae2536dc54bc4cc.tar.gz
Fix blank line issues reported by flake8
- E301 expected 1 blank line - E302 expected 2 blank lines - E303 too many blank lines - E305 expected 2 blank lines after class or function definition - E306 expected 1 blank line before a nested definition Fixed automatically with autopep8: git ls-files | grep py$ | xargs autopep8 --in-place \ --select E301,E302,E303,E305,E306 Manually fix issues in project.py caused by misuse of block comments. Change-Id: Iee840fcaff48aae504ddac9c3e76d2acd484f6a9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254599 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
Diffstat (limited to 'gitc_utils.py')
-rw-r--r--gitc_utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gitc_utils.py b/gitc_utils.py
index 45920b07..11284e20 100644
--- a/gitc_utils.py
+++ b/gitc_utils.py
@@ -29,12 +29,15 @@ from error import ManifestParseError
29 29
30NUM_BATCH_RETRIEVE_REVISIONID = 32 30NUM_BATCH_RETRIEVE_REVISIONID = 32
31 31
32
32def get_gitc_manifest_dir(): 33def get_gitc_manifest_dir():
33 return wrapper.Wrapper().get_gitc_manifest_dir() 34 return wrapper.Wrapper().get_gitc_manifest_dir()
34 35
36
35def parse_clientdir(gitc_fs_path): 37def parse_clientdir(gitc_fs_path):
36 return wrapper.Wrapper().gitc_parse_clientdir(gitc_fs_path) 38 return wrapper.Wrapper().gitc_parse_clientdir(gitc_fs_path)
37 39
40
38def _set_project_revisions(projects): 41def _set_project_revisions(projects):
39 """Sets the revisionExpr for a list of projects. 42 """Sets the revisionExpr for a list of projects.
40 43
@@ -63,6 +66,7 @@ def _set_project_revisions(projects):
63 (proj.remote.url, proj.revisionExpr)) 66 (proj.remote.url, proj.revisionExpr))
64 proj.revisionExpr = revisionExpr 67 proj.revisionExpr = revisionExpr
65 68
69
66def _manifest_groups(manifest): 70def _manifest_groups(manifest):
67 """Returns the manifest group string that should be synced 71 """Returns the manifest group string that should be synced
68 72
@@ -77,6 +81,7 @@ def _manifest_groups(manifest):
77 groups = 'default,platform-' + platform.system().lower() 81 groups = 'default,platform-' + platform.system().lower()
78 return groups 82 return groups
79 83
84
80def generate_gitc_manifest(gitc_manifest, manifest, paths=None): 85def generate_gitc_manifest(gitc_manifest, manifest, paths=None):
81 """Generate a manifest for shafsd to use for this GITC client. 86 """Generate a manifest for shafsd to use for this GITC client.
82 87
@@ -140,6 +145,7 @@ def generate_gitc_manifest(gitc_manifest, manifest, paths=None):
140 # Save the manifest. 145 # Save the manifest.
141 save_manifest(manifest) 146 save_manifest(manifest)
142 147
148
143def save_manifest(manifest, client_dir=None): 149def save_manifest(manifest, client_dir=None):
144 """Save the manifest file in the client_dir. 150 """Save the manifest file in the client_dir.
145 151