Remove dead code

R=gavinmak@google.com

Change-Id: If27b290ebb575db5ec93b4abcb7f432bedd6f18a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5153638
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
changes/38/5153638/3
Josip Sokcevic 2 years ago committed by LUCI CQ
parent 751c658593
commit 31a99001bd

@ -2284,7 +2284,7 @@ class Changelist(object):
# Fall back on still unique, but less efficient change number.
return str(self.GetIssue())
def EnsureAuthenticated(self, force, refresh=None):
def EnsureAuthenticated(self, force):
"""Best effort check that user is authenticated with Gerrit server."""
if settings.GetGerritSkipEnsureAuthenticated():
# For projects with unusual authentication schemes.
@ -2741,8 +2741,7 @@ class Changelist(object):
break
return 0
def CMDPatchWithParsedIssue(self, parsed_issue_arg, nocommit, force,
newbranch):
def CMDPatchWithParsedIssue(self, parsed_issue_arg, nocommit, force):
assert parsed_issue_arg.valid
self.issue = parsed_issue_arg.issue
@ -3946,7 +3945,7 @@ def get_cl_statuses(changes, fine_grained, max_processes=None):
# First, sort out authentication issues.
logging.debug('ensuring credentials exist')
for cl in changes:
cl.EnsureAuthenticated(force=False, refresh=True)
cl.EnsureAuthenticated(force=False)
def fetch(cl):
try:
@ -5558,7 +5557,7 @@ def CMDpatch(parser, args):
target_issue_arg = ParseIssueNumberArgument(cl.GetIssue())
return cl.CMDPatchWithParsedIssue(target_issue_arg, options.nocommit,
options.force, False)
options.force)
if len(args) != 1 or not args[0]:
parser.error('Must specify issue number or URL.')
@ -5585,7 +5584,7 @@ def CMDpatch(parser, args):
print('canonical issue/change URL: %s\n' % cl.GetIssueURL())
return cl.CMDPatchWithParsedIssue(target_issue_arg, options.nocommit,
options.force, options.newbranch)
options.force)
def GetTreeStatus(url=None):

@ -957,15 +957,13 @@ def GetUnitTestsInDirectory(input_api,
env=None,
run_on_python2=False,
run_on_python3=True,
skip_shebang_check=True,
allowlist=None,
blocklist=None):
skip_shebang_check=True):
"""Lists all files in a directory and runs them. Doesn't recurse.
It's mainly a wrapper for RunUnitTests. Use allowlist and blocklist to filter
tests accordingly. run_on_python2, run_on_python3, and skip_shebang_check are
no longer used but have to be retained because of the many callers in other
repos that pass them in.
It's mainly a wrapper for RunUnitTests. Use files_to_check and files_to_skip
to filter tests accordingly. run_on_python2, run_on_python3, and
skip_shebang_check are no longer used but have to be retained because of the
many callers in other repos that pass them in.
"""
del run_on_python2
del run_on_python3

@ -772,9 +772,7 @@ class InputApi(object):
def FilterSourceFile(self,
affected_file,
files_to_check=None,
files_to_skip=None,
allow_list=None,
block_list=None):
files_to_skip=None):
"""Filters out files that aren't considered 'source file'.
If files_to_check or files_to_skip is None, InputApi.DEFAULT_FILES_TO_CHECK

Loading…
Cancel
Save