cpplint: fix deprecation warnings with docstrings

Fix warnings with Python 3.8 like:
.../depot_tools/cpplint.py:3006: DeprecationWarning: invalid escape sequence \%
  """Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
.../depot_tools/cpplint.py:4842: DeprecationWarning: invalid escape sequence \(
  """Retrieves all the text between matching open and close parentheses.

Change-Id: I99987e766cda98e2b8d8476f7900b9f99d58761e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5328187
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
changes/87/5328187/2
Mike Frysinger 1 year ago committed by LUCI CQ
parent 129a392a2a
commit d972b831c3

4
cpplint.py vendored

@ -3003,7 +3003,7 @@ class NestingState(object):
def CheckForNonStandardConstructs(filename, clean_lines, linenum, nesting_state,
error):
"""Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
r"""Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
Complain about several constructs which gcc-2 accepts, but which are
not standard C++. Warning about these in lint is one way to ease the
@ -4839,7 +4839,7 @@ def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
def _GetTextInside(text, start_pattern):
"""Retrieves all the text between matching open and close parentheses.
r"""Retrieves all the text between matching open and close parentheses.
Given a string of lines and a regular expression string, retrieve all the text
following the expression and between opening punctuation symbols like

Loading…
Cancel
Save