diff --git a/gcl.py b/gcl.py index 2c11e7bff..09364251f 100755 --- a/gcl.py +++ b/gcl.py @@ -20,9 +20,7 @@ import time from third_party import upload import urllib2 -__pychecker__ = 'unusednames=breakpad' import breakpad -__pychecker__ = '' # gcl now depends on gclient. from scm import SVN @@ -669,6 +667,7 @@ def defer_attributes(a, b): def need_change(function): """Converts args -> change_info.""" + # pylint: disable=W0612,W0621 def hook(args): if not len(args) == 1: ErrorExit("You need to pass a change list name") @@ -682,6 +681,7 @@ def need_change(function): def need_change_and_args(function): """Converts args -> change_info.""" + # pylint: disable=W0612,W0621 def hook(args): if not args: ErrorExit("You need to pass a change list name") @@ -694,6 +694,7 @@ def need_change_and_args(function): def no_args(function): """Make sure no args are passed.""" + # pylint: disable=W0612,W0621 def hook(args): if args: ErrorExit("Doesn't support arguments") @@ -1041,8 +1042,8 @@ def CMDchange(args): filename = line[7:] new_cl_files.append((status, filename)) - if (not len(change_info._files)) and (not change_info.issue) and \ - (not len(new_description) and (not new_cl_files)): + if (not len(change_info.GetFiles()) and not change_info.issue and + not len(new_description) and not new_cl_files): ErrorExit("Empty changelist not saved") change_info._files = new_cl_files @@ -1143,7 +1144,7 @@ def CMDdeleteempties(): print "\n--- Deleting:" for cl in GetCLs(): change_info = ChangeInfo.Load(cl, GetRepositoryRoot(), True, True) - if not len(change_info._files): + if not len(change_info.GetFiles()): print change_info.name change_info.Delete() return 0 @@ -1264,13 +1265,13 @@ def GenUsage(command): more = getattr(obj, 'usage', '') if command == 'help': display = '' - need_change = '' + need_change_val = '' if getattr(obj, 'need_change', None): - need_change = ' ' + need_change_val = ' ' options = ' [options]' if getattr(obj, 'no_args', None): options = '' - res = 'Usage: gcl %s%s%s %s\n\n' % (display, need_change, options, more) + res = 'Usage: gcl %s%s%s %s\n\n' % (display, need_change_val, options, more) res += re.sub('\n ', '\n', obj.__doc__) return res diff --git a/pylintrc b/pylintrc index 582061ff7..bb5f1b987 100644 --- a/pylintrc +++ b/pylintrc @@ -35,6 +35,7 @@ load-plugins= # C0103: Invalid name "" # C0111: Missing docstring # C0302: Too many lines in module (N) +# I0011: Locally disabling WNNNN # R0901: Too many ancestors (8/7) # R0902: Too many instance attributes (N/7) # R0903: Too few public methods (N/2) @@ -48,7 +49,7 @@ load-plugins= # W0603: Using the global statement # W0613: Unused argument '' # W6501: Specify string format arguments as logging function parameters -disable=C0103,C0111,C0302,R0901,R0902,R0903,R0911,R0912,R0913,R0914,R0915,W0122,W0141,W0603,W0613,W6501 +disable=C0103,C0111,C0302,I0011,R0901,R0902,R0903,R0911,R0912,R0913,R0914,R0915,W0122,W0141,W0603,W0613,W6501 [REPORTS]