Commit 89b222db authored by Bruce Dawson's avatar Bruce Dawson Committed by LUCI CQ

Print full path and upgrade details in PyLint warning

A run of "git cl presubmit --all" shows that PyLint 1.5 is being run
from nine locations, however the deprecation warnings don't say where.
This makes it difficult to file bugs or fix the remaining instances.
This changes the message to list the path to the presubmit that is
running PyLint 1.5.

This also adds instructions on how to change to version 2.7.

Before:

  pylint-1.5 is deprecated, please switch to 2.7 before 2022-07-11

After (with word wrapping):

  pylint-1.5 is being run on ...src\tools\find_runtime_symbols
  and is deprecated, please switch to 2.7 before 2022-07-11 (add
  version='2.7' to RunPylint call)

Change-Id: Iece2cb904f5d26ad66e3ab78f7ce7aef1878bfd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3688839Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
parent 35ef5ada
......@@ -1117,8 +1117,11 @@ def GetPylint(input_api,
]
if version == '1.5':
# Warn users about pylint-1.5 deprecation
tests.append(output_api.PresubmitPromptWarning(
'pylint-1.5 is deprecated, please switch to 2.7 before 2022-07-11'))
tests.append(
output_api.PresubmitPromptWarning(
'pylint-1.5 is being run on %s and is deprecated, please switch '
'to 2.7 before 2022-07-11 (add version=\'2.7\' to RunPylint call)'
% input_api.PresubmitLocalPath()))
return tests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment