mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 00:24:05 +08:00
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>
This commit is contained in:
10
project.py
10
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:
|
||||
|
||||
Reference in New Issue
Block a user