Commit 42868761 authored by qsr's avatar qsr Committed by Commit bot

mojo: Update PRESBUMIT.py

- Update pylint to consider python bindings and python bindings tests.
- Resolve pylint warnings.

R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/643853004

Cr-Commit-Position: refs/heads/master@{#299126}
parent 97cbde97
......@@ -19,6 +19,12 @@ def CheckChangeOnUpload(input_api, output_api):
# For the bindings generator:
mojo_public_bindings_pylib_path = os.path.join(
input_api.PresubmitLocalPath(), "public", "tools", "bindings", "pylib")
# For the python bindings:
mojo_python_bindings_path = os.path.join(
input_api.PresubmitLocalPath(), "public", "python")
# For the python bindings tests:
mojo_python_bindings_tests_path = os.path.join(
input_api.PresubmitLocalPath(), "python", "tests")
# TODO(vtl): Don't lint these files until the (many) problems are fixed
# (possibly by deleting/rewriting some files).
temporary_black_list = input_api.DEFAULT_BLACK_LIST + \
......@@ -30,7 +36,12 @@ def CheckChangeOnUpload(input_api, output_api):
r".*\btools[\\\/]test_runner\.py$")
results = []
pylint_extra_paths = [third_party_path, mojo_public_bindings_pylib_path]
pylint_extra_paths = [
third_party_path,
mojo_public_bindings_pylib_path,
mojo_python_bindings_path,
mojo_python_bindings_tests_path,
]
results += input_api.canned_checks.RunPylint(
input_api, output_api, extra_paths_list=pylint_extra_paths,
black_list=temporary_black_list)
......
......@@ -10,8 +10,9 @@ import array
import itertools
import struct
# pylint: disable=F0401
import mojo.bindings.serialization as serialization
# pylint: disable=E0611,F0401
import mojo.system
......
......@@ -8,8 +8,9 @@
import struct
import weakref
# pylint: disable=F0401
import mojo.bindings.serialization as serialization
# pylint: disable=E0611,F0401
import mojo.system as system
......
......@@ -4,7 +4,7 @@
import mojo_unittest
# pylint: disable=F0401
# pylint: disable=E0611
from mojo import system
......
......@@ -5,8 +5,9 @@
import math
import unittest
# pylint: disable=F0401
import mojo.bindings.reflection as reflection
# pylint: disable=E0611,F0401
import mojo.system
# Generated files
......
......@@ -5,7 +5,7 @@
import math
import unittest
# pylint: disable=F0401
# pylint: disable=E0611,F0401
import mojo.system
# Generated files
......
......@@ -5,15 +5,16 @@
import unittest
import mojo_unittest
# pylint: disable=F0401
from mojo.bindings import messaging
# pylint: disable=E0611
from mojo import system
class _ForwardingConnectionErrorHandler(messaging.ConnectionErrorHandler):
def __init__(self, callback):
messaging.ConnectionErrorHandler.__init__(self)
self._callback = callback
def OnError(self, result):
......
......@@ -4,7 +4,7 @@
import unittest
# pylint: disable=F0401
# pylint: disable=E0611,F0401
import mojo.embedder
import mojo.system as system
......
......@@ -4,7 +4,7 @@
import mojo_unittest
# pylint: disable=F0401
# pylint: disable=E0611
from mojo import system
......
......@@ -7,7 +7,7 @@ import time
import mojo_unittest
# pylint: disable=F0401
# pylint: disable=E0611
from mojo import system
DATA_SIZE = 1024
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment