RESOLVED FIXED 214531
pep8.py:110: FutureWarning: Possible nested set at position 1
https://bugs.webkit.org/show_bug.cgi?id=214531
Summary pep8.py:110: FutureWarning: Possible nested set at position 1
Michael Catanzaro
Reported 2020-07-19 05:25:13 PDT
Let's try to fix this python warning that occurs when running webkit-patch: $ webkit-patch upload /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'[[({] | []}),;:]') Since we don't control the code, we should update to a newer version of pep8. It has been renamed to pycodestyle. I've tested this patch with python3. I think it should work with python2. Let's see if EWS likes it.
Attachments
Patch (4.55 KB, patch)
2020-07-19 05:31 PDT, Michael Catanzaro
no flags
Patch (5.21 KB, patch)
2020-07-19 06:12 PDT, Michael Catanzaro
no flags
Patch for landing (1.22 KB, patch)
2020-07-24 16:51 PDT, Jonathan Bedard
no flags
Michael Catanzaro
Comment 1 2020-07-19 05:30:52 PDT
BTW, maybe I'm doing something wrong, but this style checker seems unable to find obvious style errors in our python code even without any of my changes....
Michael Catanzaro
Comment 2 2020-07-19 05:31:23 PDT
Michael Catanzaro
Comment 3 2020-07-19 06:10:18 PDT
Seems that works. Attaching an alternate patch to see if we can get away with removing pep8 and using pycodestyle also for python2.
Michael Catanzaro
Comment 4 2020-07-19 06:12:27 PDT
Michael Catanzaro
Comment 5 2020-07-19 06:54:43 PDT
*** Bug 209017 has been marked as a duplicate of this bug. ***
Michael Catanzaro
Comment 6 2020-07-19 07:03:06 PDT
(In reply to Michael Catanzaro from comment #1) > BTW, maybe I'm doing something wrong, but this style checker seems unable to > find obvious style errors in our python code even without any of my > changes.... Apparently I was looking for style rules that we suppress. It actually still works fine if I violate the right rules: $ check-webkit-style ERROR: Source/WebKit/Scripts/generate-message-receiver.py:41: missing whitespace around operator [pep8/E225] [5] ERROR: Source/WebKit/Scripts/generate-message-receiver.py:42: missing whitespace around operator [pep8/E225] [5] ERROR: Source/WebKit/Scripts/generate-message-receiver.py:45: missing whitespace after ',' [pep8/E231] [5] Total errors found: 3 in 3 files Seems good.
EWS
Comment 7 2020-07-19 11:45:12 PDT
Committed r264579: <https://trac.webkit.org/changeset/264579> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404665 [details].
Radar WebKit Bug Importer
Comment 8 2020-07-19 11:46:14 PDT
Jonathan Bedard
Comment 9 2020-07-24 16:51:00 PDT
Reopening to attach new patch.
Jonathan Bedard
Comment 10 2020-07-24 16:51:02 PDT
Created attachment 405204 [details] Patch for landing
Jonathan Bedard
Comment 11 2020-07-24 16:51:49 PDT
(In reply to Jonathan Bedard from comment #10) > Created attachment 405204 [details] > Patch for landing Pep8 was removed from the auto importer, we should remove it from the test as well.
EWS
Comment 12 2020-07-24 17:12:43 PDT
Committed r264872: <https://trac.webkit.org/changeset/264872> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405204 [details].
Michael Catanzaro
Comment 13 2020-07-24 17:22:35 PDT
Comment on attachment 405204 [details] Patch for landing Good catch!
Note You need to log in before you can comment on or make changes to this bug.