mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 00:24:05 +08:00
Coding style cleanup
Fix the following issues reported by pylint: C0321: More than one statement on a single line W0622: Redefining built-in 'name' W0612: Unused variable 'name' W0613: Unused argument 'name' W0102: Dangerous default value 'value' as argument W0105: String statement has no effect Also fixed a few cases of inconsistent indentation. Change-Id: Ie0db839e7c57d576cff12d8c055fe87030d00744
This commit is contained in:
committed by
Gustaf Lundh
parent
e3b1c45aeb
commit
8a68ff9605
10
main.py
10
main.py
@@ -88,7 +88,7 @@ class _Repo(object):
|
||||
glob = argv
|
||||
name = 'help'
|
||||
argv = []
|
||||
gopts, gargs = global_options.parse_args(glob)
|
||||
gopts, _gargs = global_options.parse_args(glob)
|
||||
|
||||
if gopts.trace:
|
||||
SetTrace()
|
||||
@@ -182,8 +182,8 @@ def _CheckWrapperVersion(ver, repo_path):
|
||||
repo_path = '~/bin/repo'
|
||||
|
||||
if not ver:
|
||||
print >>sys.stderr, 'no --wrapper-version argument'
|
||||
sys.exit(1)
|
||||
print >>sys.stderr, 'no --wrapper-version argument'
|
||||
sys.exit(1)
|
||||
|
||||
exp = _CurrentWrapperVersion()
|
||||
ver = tuple(map(lambda x: int(x), ver.split('.')))
|
||||
@@ -211,8 +211,8 @@ def _CheckWrapperVersion(ver, repo_path):
|
||||
|
||||
def _CheckRepoDir(dir):
|
||||
if not dir:
|
||||
print >>sys.stderr, 'no --repo-dir argument'
|
||||
sys.exit(1)
|
||||
print >>sys.stderr, 'no --repo-dir argument'
|
||||
sys.exit(1)
|
||||
|
||||
def _PruneOptions(argv, opt):
|
||||
i = 0
|
||||
|
||||
Reference in New Issue
Block a user