From 819827a42ddb364f98c3a1a7eae2536dc54bc4cc Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 12 Feb 2020 15:20:19 +0900 Subject: 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 Tested-by: David Pursehouse --- project.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'project.py') 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): def sq(r): return "'" + r.replace("'", "'\''") + "'" + _project_hook_list = None @@ -1256,9 +1257,7 @@ class Project(object): print(line[:-1]) return p.Wait() == 0 - # Publish / Upload ## - def WasPublished(self, branch, all_refs=None): """Was the branch published (uploaded) for code review? If so, returns the SHA-1 hash of the last published @@ -1410,9 +1409,7 @@ class Project(object): R_HEADS + branch.name, message=msg) - # Sync ## - def _ExtractArchive(self, tarpath, path=None): """Extract the given tar on its current location @@ -1819,9 +1816,7 @@ class Project(object): patch_id, self.bare_git.rev_parse('FETCH_HEAD')) - # Branch Management ## - def GetHeadPath(self): """Return the full path to the HEAD ref.""" dotgit = os.path.join(self.worktree, '.git') @@ -2019,9 +2014,7 @@ class Project(object): kept.append(ReviewableBranch(self, branch, base)) return kept - # Submodule Management ## - def GetRegisteredSubprojects(self): result = [] @@ -2172,7 +2165,6 @@ class Project(object): result.extend(subproject.GetDerivedSubprojects()) return result - # Direct Git Commands ## def _CheckForImmutableRevision(self): try: -- cgit v1.2.3-54-g00ecf