Bug 214536

Summary: cpp.py:3688: FutureWarning: Possible nested set at position 101
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: Tools / TestsAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ews-watchlist, glenn, jbedard, mcatanzaro, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Description Michael Catanzaro 2020-07-19 08:06:27 PDT
$ check-webkit-style 
/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pep8.py:110: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py:3688: FutureWarning: Possible nested set at position 101
  check_identifier_name_in_declaration(filename, line_number, line, file_state, error)
/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py:3688: FutureWarning: Possible nested set at position 73
  check_identifier_name_in_declaration(filename, line_number, line, file_state, error)
Total errors found: 0 in 5 files

First warning is bug #214531. Let's fix the others here. Seems the warning was added in https://bugs.python.org/issue30349 and all we need to do is escape [ when used inside a set. That is, we have to change "[[" to "[\[". That was a little hard to figure out because the warning message points to the wrong line... the issue is on line 3780, not line 3688.
Comment 1 Michael Catanzaro 2020-07-19 08:08:04 PDT
Created attachment 404670 [details]
Patch
Comment 2 Michael Catanzaro 2020-07-19 08:09:32 PDT
(BTW, the warning means this code will break in a future version of python if we do not add the escape. The escape will maintain current behavior going forward.)
Comment 3 EWS 2020-07-19 12:06:27 PDT
Committed r264581: <https://trac.webkit.org/changeset/264581>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404670 [details].
Comment 4 Radar WebKit Bug Importer 2020-07-19 12:07:15 PDT
<rdar://problem/65794323>