RESOLVED FIXED214536
cpp.py:3688: FutureWarning: Possible nested set at position 101
https://bugs.webkit.org/show_bug.cgi?id=214536
Summary cpp.py:3688: FutureWarning: Possible nested set at position 101
Michael Catanzaro
Reported 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.
Attachments
Patch (1.83 KB, patch)
2020-07-19 08:08 PDT, Michael Catanzaro
no flags
Michael Catanzaro
Comment 1 2020-07-19 08:08:04 PDT
Michael Catanzaro
Comment 2 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.)
EWS
Comment 3 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].
Radar WebKit Bug Importer
Comment 4 2020-07-19 12:07:15 PDT
Note You need to log in before you can comment on or make changes to this bug.