summaryrefslogtreecommitdiffstats
path: root/project.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 /project.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 'project.py')
-rw-r--r--project.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/project.py b/project.py
index 8c56af42..372421cf 100644
--- a/project.py
+++ b/project.py
@@ -85,6 +85,7 @@ def not_rev(r):
85def sq(r): 85def sq(r):
86 return "'" + r.replace("'", "'\''") + "'" 86 return "'" + r.replace("'", "'\''") + "'"
87 87
88
88_project_hook_list = None 89_project_hook_list = None
89 90
90 91
@@ -1256,9 +1257,7 @@ class Project(object):
1256 print(line[:-1]) 1257 print(line[:-1])
1257 return p.Wait() == 0 1258 return p.Wait() == 0
1258 1259
1259
1260# Publish / Upload ## 1260# Publish / Upload ##
1261
1262 def WasPublished(self, branch, all_refs=None): 1261 def WasPublished(self, branch, all_refs=None):
1263 """Was the branch published (uploaded) for code review? 1262 """Was the branch published (uploaded) for code review?
1264 If so, returns the SHA-1 hash of the last published 1263 If so, returns the SHA-1 hash of the last published
@@ -1410,9 +1409,7 @@ class Project(object):
1410 R_HEADS + branch.name, 1409 R_HEADS + branch.name,
1411 message=msg) 1410 message=msg)
1412 1411
1413
1414# Sync ## 1412# Sync ##
1415
1416 def _ExtractArchive(self, tarpath, path=None): 1413 def _ExtractArchive(self, tarpath, path=None):
1417 """Extract the given tar on its current location 1414 """Extract the given tar on its current location
1418 1415
@@ -1819,9 +1816,7 @@ class Project(object):
1819 patch_id, 1816 patch_id,
1820 self.bare_git.rev_parse('FETCH_HEAD')) 1817 self.bare_git.rev_parse('FETCH_HEAD'))
1821 1818
1822
1823# Branch Management ## 1819# Branch Management ##
1824
1825 def GetHeadPath(self): 1820 def GetHeadPath(self):
1826 """Return the full path to the HEAD ref.""" 1821 """Return the full path to the HEAD ref."""
1827 dotgit = os.path.join(self.worktree, '.git') 1822 dotgit = os.path.join(self.worktree, '.git')
@@ -2019,9 +2014,7 @@ class Project(object):
2019 kept.append(ReviewableBranch(self, branch, base)) 2014 kept.append(ReviewableBranch(self, branch, base))
2020 return kept 2015 return kept
2021 2016
2022
2023# Submodule Management ## 2017# Submodule Management ##
2024
2025 def GetRegisteredSubprojects(self): 2018 def GetRegisteredSubprojects(self):
2026 result = [] 2019 result = []
2027 2020
@@ -2172,7 +2165,6 @@ class Project(object):
2172 result.extend(subproject.GetDerivedSubprojects()) 2165 result.extend(subproject.GetDerivedSubprojects())
2173 return result 2166 return result
2174 2167
2175
2176# Direct Git Commands ## 2168# Direct Git Commands ##
2177 def _CheckForImmutableRevision(self): 2169 def _CheckForImmutableRevision(self):
2178 try: 2170 try: