2010-04-01 Eric Seidel <eric@webkit.org>
[WebKit-https.git] / WebKitTools / Scripts / webkitpy / style / processors / python.py
index 8ab936d52a6d2750be13c3500f41409e331eb854..39fdb964510484846b12e873ab8a3e3ac22de974 100644 (file)
@@ -36,8 +36,8 @@ class PythonProcessor(object):
     def process(self, lines):
         # Initialize pep8.options, which is necessary for
         # Checker.check_all() to execute.
     def process(self, lines):
         # Initialize pep8.options, which is necessary for
         # Checker.check_all() to execute.
-        pep8.process_options(arglist=[self._file_path])
 
 
+        pep8.process_options(arglist=[self._file_path])
         checker = pep8.Checker(self._file_path)
 
         def _pep8_handle_error(line_number, offset, text, check):
         checker = pep8.Checker(self._file_path)
 
         def _pep8_handle_error(line_number, offset, text, check):
@@ -47,6 +47,11 @@ class PythonProcessor(object):
             pep8_code = text[:4]
             pep8_message = text[5:]
 
             pep8_code = text[:4]
             pep8_message = text[5:]
 
+            # We ignore PEP8/E501 -- line limit of 79 characters. Most of our
+            # python code fails E501 and the rest of WebKit has no wrap limit.
+            if pep8_code == "E501":
+                return
+
             category = "pep8/" + pep8_code
 
             self._handle_style_error(line_number, category, 5, pep8_message)
             category = "pep8/" + pep8_code
 
             self._handle_style_error(line_number, category, 5, pep8_message)