Modified: trunk/Tools/ChangeLog (264578 => 264579)
--- trunk/Tools/ChangeLog 2020-07-19 18:23:07 UTC (rev 264578)
+++ trunk/Tools/ChangeLog 2020-07-19 18:45:07 UTC (rev 264579)
@@ -1,3 +1,23 @@
+2020-07-19 Michael Catanzaro <[email protected]>
+
+ pep8.py:110: FutureWarning: Possible nested set at position 1
+ https://bugs.webkit.org/show_bug.cgi?id=214531
+
+ Reviewed by Darin Adler.
+
+ Update from pep8 to pycodestyle.
+
+ * Scripts/webkitpy/style/checkers/python.py:
+ (PythonChecker.check):
+ (PythonChecker._check_pycodestyle):
+ (PythonChecker._check_pycodestyle._pycodestyle_handle_error):
+ (PythonChecker._check_pep8): Deleted.
+ (PythonChecker._check_pep8._pep8_handle_error): Deleted.
+ * Scripts/webkitpy/thirdparty/__init__.py:
+ (AutoinstallImportHook.find_module):
+ (AutoinstallImportHook._install_keyring):
+ (AutoinstallImportHook._install_pep8): Deleted.
+
2020-07-17 Sam Weinig <[email protected]>
Remove final vestigates of SimpleColor
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/python.py (264578 => 264579)
--- trunk/Tools/Scripts/webkitpy/style/checkers/python.py 2020-07-19 18:23:07 UTC (rev 264578)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/python.py 2020-07-19 18:45:07 UTC (rev 264579)
@@ -30,9 +30,8 @@
from webkitpy.common.unicode_compatibility import StringIO
from webkitpy.common.system.outputcapture import OutputCaptureScope
from webkitpy.common.webkit_finder import WebKitFinder
-from webkitpy.thirdparty.autoinstalled import pep8
+from webkitpy.thirdparty.autoinstalled import pycodestyle
-
class PythonChecker(object):
"""Processes text lines for checking style."""
def __init__(self, file_path, handle_style_error):
@@ -40,32 +39,32 @@
self._handle_style_error = handle_style_error
def check(self, lines):
- self._check_pep8(lines)
+ self._check_pycodestyle(lines)
# FIXME: https://bugs.webkit.org/show_bug.cgi?id=204133
# Pylint can't live happily in python 2 and 3 world, we need to pick one
if sys.version_info < (3, 0):
self._check_pylint(lines)
- def _check_pep8(self, lines):
- # Initialize pep8.options, which is necessary for
+ def _check_pycodestyle(self, lines):
+ # Initialize pycodestyle.options, which is necessary for
# Checker.check_all() to execute.
- pep8.process_options(arglist=[self._file_path])
+ pycodestyle.process_options(arglist=[self._file_path])
- pep8_checker = pep8.Checker(self._file_path)
+ pycodestyle_checker = pycodestyle.Checker(self._file_path)
- def _pep8_handle_error(line_number, offset, text, check):
+ def _pycodestyle_handle_error(line_number, offset, text, check):
# FIXME: Incorporate the character offset into the error output.
# This will require updating the error handler __call__
# signature to include an optional "offset" parameter.
- pep8_code = text[:4]
- pep8_message = text[5:]
+ pycodestyle_code = text[:4]
+ pycodestyle_message = text[5:]
- category = "pep8/" + pep8_code
+ category = "pep8/" + pycodestyle_code
- self._handle_style_error(line_number, category, 5, pep8_message)
+ self._handle_style_error(line_number, category, 5, pycodestyle_message)
- pep8_checker.report_error = _pep8_handle_error
- pep8_errors = pep8_checker.check_all()
+ pycodestyle_checker.report_error = _pycodestyle_handle_error
+ pycodestyle_errors = pycodestyle_checker.check_all()
def _check_pylint(self, lines):
pylinter = Pylinter()
Modified: trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py (264578 => 264579)
--- trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py 2020-07-19 18:23:07 UTC (rev 264578)
+++ trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py 2020-07-19 18:45:07 UTC (rev 264579)
@@ -94,8 +94,6 @@
# order for autoinstall_everything(), below, to work properly.
if '.mechanize' in fullname:
self._install_mechanize()
- elif '.pep8' in fullname:
- self._install_pep8()
elif '.pycodestyle' in fullname:
self._install_pycodestyle()
elif '.pylint' in fullname:
@@ -153,9 +151,6 @@
self._install("https://files.pythonhosted.org/packages/7d/a9/8c6bf60710781ce13a9987c0debda8adab35eb79c6b5525f7fe5240b7a8a/keyring-7.3.1.tar.gz",
"keyring-7.3.1/keyring")
- def _install_pep8(self):
- self._install("https://files.pythonhosted.org/packages/01/a0/64ba19519db49e4094d82599412a9660dee8c26a7addbbb1bf17927ceefe/pep8-1.7.1.tar.gz",
- "pep8-1.7.1/pep8.py")
def _install_pycodestyle(self):
self._install("https://files.pythonhosted.org/packages/source/p/pycodestyle/pycodestyle-2.5.0.tar.gz",
"pycodestyle-2.5.0/pycodestyle.py")