Python 3: Add support in webkitpy.style.checkers
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Nov 2019 01:04:35 +0000 (01:04 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Nov 2019 01:04:35 +0000 (01:04 +0000)
commitb7f1bdc2fcc806373845f808a30061eef40ff1d4
tree381cd3dda76d9e7ac304b19b7b3a296467a9be49
parent314d386058c39ba9f4b61bd021409f642d37f17d
Python 3: Add support in webkitpy.style.checkers
https://bugs.webkit.org/show_bug.cgi?id=203761

Rubber-stamped by Stephanie Lewis.

* Scripts/test-webkitpy-python3: Add webkitpy.style.checkers.
* Scripts/webkitpy/port/builders.py:
(all_port_names): Convert map to a list before concatenating.
* Scripts/webkitpy/style/checkers/changelog.py: Use explicit imports.
* Scripts/webkitpy/style/checkers/changelog_unittest.py: Ditto.
* Scripts/webkitpy/style/checkers/cmake.py: Ditto.
* Scripts/webkitpy/style/checkers/cmake_unittest.py: Ditto.
* Scripts/webkitpy/style/checkers/common_unittest.py: Ditto.
* Scripts/webkitpy/style/checkers/contributors.py: Ditto.
* Scripts/webkitpy/style/checkers/cpp.py:
(Position): Add rich comparison functions.
(check_for_copyright): Use range instead of xrange.
(detect_functions): Ditto.
(check_language): Use r-string.
(check_for_include_what_you_use): Use range instead of xrange.
(_process_lines): Convert iterator to list, use range instead of xrange.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest): Be explicit about bytes vs strings.
* Scripts/webkitpy/style/checkers/js.py: Use explicit imports.
* Scripts/webkitpy/style/checkers/js_unittest.py: Ditto.
* Scripts/webkitpy/style/checkers/jsonchecker.py: Ditto.
(JSONFeaturesChecker.check):
* Scripts/webkitpy/style/checkers/jsonchecker_unittest.py: Ditto.
(JSONCheckerTest.test_conflict_marker): Differentiate between Python 2 and 3
json parsers.
* Scripts/webkitpy/style/checkers/jstest_unittest.py: Use explicit imports.
* Scripts/webkitpy/style/checkers/messagesin.py: Ditto.
* Scripts/webkitpy/style/checkers/messagesin_unittest.py: Ditto.
* Scripts/webkitpy/style/checkers/png_unittest.py: Ditto.
* Scripts/webkitpy/style/checkers/python.py:
(PythonChecker.check): Only run pylint in Python 2.
(PythonChecker._check_pylint): Use r string.
(Pylinter.run): Surpress logging from Pylint.
* Scripts/webkitpy/style/checkers/python_unittest.py: Use explicit imports.
(PythonCheckerTest.test_check): Add FIXME for running pylint in Python 3.
* Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py:
* Scripts/webkitpy/style/checkers/python_unittest_input.py:
* Scripts/webkitpy/style/checkers/test_expectations.py: Use explicit imports.
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py: Ditto.
* Scripts/webkitpy/style/checkers/text.py: Ditto.
* Scripts/webkitpy/style/checkers/text_unittest.py: Ditto.
* Scripts/webkitpy/style/checkers/watchlist_unittest.py: Ditto.
* Scripts/webkitpy/style/checkers/xcodeproj_unittest.py: Ditto.
* Scripts/webkitpy/style/checkers/xml_unittest.py: Ditto.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_pep8): Update pep8 version.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
Tools/ChangeLog
Tools/Scripts/test-webkitpy-python3
Tools/Scripts/webkitpy/port/builders.py
Tools/Scripts/webkitpy/style/checkers/changelog.py
Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py
Tools/Scripts/webkitpy/style/checkers/cmake.py
Tools/Scripts/webkitpy/style/checkers/cmake_unittest.py
Tools/Scripts/webkitpy/style/checkers/common_unittest.py
Tools/Scripts/webkitpy/style/checkers/contributors.py
Tools/Scripts/webkitpy/style/checkers/cpp.py
Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
Tools/Scripts/webkitpy/style/checkers/js.py
Tools/Scripts/webkitpy/style/checkers/js_unittest.py
Tools/Scripts/webkitpy/style/checkers/jsonchecker.py
Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py
Tools/Scripts/webkitpy/style/checkers/jstest_unittest.py
Tools/Scripts/webkitpy/style/checkers/messagesin.py
Tools/Scripts/webkitpy/style/checkers/messagesin_unittest.py
Tools/Scripts/webkitpy/style/checkers/png_unittest.py
Tools/Scripts/webkitpy/style/checkers/python.py
Tools/Scripts/webkitpy/style/checkers/python_unittest.py
Tools/Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py
Tools/Scripts/webkitpy/style/checkers/python_unittest_input.py
Tools/Scripts/webkitpy/style/checkers/test_expectations.py
Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
Tools/Scripts/webkitpy/style/checkers/text.py
Tools/Scripts/webkitpy/style/checkers/text_unittest.py
Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py
Tools/Scripts/webkitpy/style/checkers/xcodeproj_unittest.py
Tools/Scripts/webkitpy/style/checkers/xml_unittest.py
Tools/Scripts/webkitpy/style/optparser.py
Tools/Scripts/webkitpy/thirdparty/__init__.py