Skip to content

Commit

Permalink
Merge pull request #2096 from tseaver/pylint-install-grpc-ignore-goog…
Browse files Browse the repository at this point in the history
…le-imports

Install 'grpc' deps into 'lint' environ; ignore 'google' imports under pylint
  • Loading branch information
tseaver authored Aug 17, 2016
2 parents 536377a + 313c2c3 commit b01aa48
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions gcloud/logging/_gax.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import json

# pylint: disable=import-error
from google.gax import CallOptions
from google.gax import INITIAL_PAGE
from google.gax.errors import GaxError
Expand All @@ -27,7 +26,6 @@
from google.logging.v2.log_entry_pb2 import LogEntry
from google.protobuf.json_format import Parse
from grpc.beta.interfaces import StatusCode
# pylint: enable=import-error

from gcloud.exceptions import Conflict
from gcloud.exceptions import NotFound
Expand Down
2 changes: 0 additions & 2 deletions gcloud/pubsub/_gax.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@

"""GAX wrapper for Pubsub API requests."""

# pylint: disable=import-error
from google.gax import CallOptions
from google.gax import INITIAL_PAGE
from google.gax.errors import GaxError
from google.gax.grpc import exc_to_code
from google.pubsub.v1.pubsub_pb2 import PubsubMessage
from google.pubsub.v1.pubsub_pb2 import PushConfig
from grpc.beta.interfaces import StatusCode
# pylint: enable=import-error

from gcloud.exceptions import Conflict
from gcloud.exceptions import NotFound
Expand Down
2 changes: 2 additions & 0 deletions scripts/pylintrc_default
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ load-plugins=pylint.extensions.check_docs
# return int(value)
# else:
# return float(value)
# - import-error: imports are checked via tests.
# - wrong-import-position: This error is overzealous. It assumes imports are
# completed whenever something non-trivial is
# defined, e.g.
Expand All @@ -100,6 +101,7 @@ disable =
similarities,
star-args,
redefined-variable-type,
import-error,
wrong-import-position,
no-name-in-module,
missing-raises-doc,
Expand Down
4 changes: 1 addition & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,9 @@ commands =
python {toxinidir}/scripts/pycodestyle_on_repo.py
python {toxinidir}/scripts/run_pylint.py
deps =
{[testing]deps}
{[testenv]deps}
pycodestyle
pylint >= 1.6.4
setenv =
PYTHONPATH = {toxinidir}/_testing
passenv = {[testenv:system-tests]passenv}

[testenv:system-tests]
Expand Down

0 comments on commit b01aa48

Please sign in to comment.