Skip to content

Commit 8426afa

Browse files
authored
Merge pull request googleapis#2425 from tseaver/pylint-disable-ungrouped-imports
Disable pylint's 'ungrouped-imports' error.
2 parents 72291ea + a56de69 commit 8426afa

File tree

8 files changed

+4
-14
lines changed

8 files changed

+4
-14
lines changed

core/google/cloud/_helpers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@
3838
from six.moves import http_client
3939
from six.moves import configparser
4040

41-
# pylint: disable=ungrouped-imports
4241
from google.cloud.environment_vars import PROJECT
4342
from google.cloud.environment_vars import CREDENTIALS
44-
# pylint: enable=ungrouped-imports
4543

4644

4745
_NOW = datetime.datetime.utcnow # To be replaced by tests.

datastore/google/cloud/datastore/connection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from google.cloud.exceptions import GrpcRendezvous
2929
from google.cloud.exceptions import make_exception
3030
from google.cloud.datastore._generated import datastore_pb2 as _datastore_pb2
31-
# pylint: disable=ungrouped-imports
3231
try:
3332
from grpc import StatusCode
3433
from google.cloud.datastore._generated import datastore_grpc_pb2
@@ -38,7 +37,6 @@
3837
StatusCode = None
3938
else:
4039
_HAVE_GRPC = True
41-
# pylint: enable=ungrouped-imports
4240

4341

4442
DATASTORE_API_HOST = 'datastore.googleapis.com'

datastore/google/cloud/datastore/helpers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@
2424
from google.type import latlng_pb2
2525
import six
2626

27-
# pylint: disable=ungrouped-imports
2827
from google.cloud._helpers import _datetime_to_pb_timestamp
2928
from google.cloud._helpers import _pb_timestamp_to_datetime
3029
from google.cloud.datastore._generated import entity_pb2 as _entity_pb2
3130
from google.cloud.datastore.entity import Entity
3231
from google.cloud.datastore.key import Key
33-
# pylint: enable=ungrouped-imports
3432

3533
__all__ = ('entity_from_protobuf', 'key_from_protobuf')
3634

logging/google/cloud/logging/_gax.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@
2727
from google.protobuf.json_format import Parse
2828
from grpc import StatusCode
2929

30-
# pylint: disable=ungrouped-imports
3130
from google.cloud._helpers import _datetime_to_pb_timestamp
3231
from google.cloud._helpers import _pb_timestamp_to_rfc3339
3332
from google.cloud.exceptions import Conflict
3433
from google.cloud.exceptions import NotFound
35-
# pylint: enable=ungrouped-imports
3634

3735

3836
class _LoggingAPI(object):

pubsub/google/cloud/pubsub/_gax.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@
2525
from grpc import insecure_channel
2626
from grpc import StatusCode
2727

28-
# pylint: disable=ungrouped-imports
2928
from google.cloud._helpers import _to_bytes
3029
from google.cloud._helpers import _pb_timestamp_to_rfc3339
3130
from google.cloud.exceptions import Conflict
3231
from google.cloud.exceptions import NotFound
33-
# pylint: enable=ungrouped-imports
3432

3533

3634
class _PublisherAPI(object):

pubsub/google/cloud/pubsub/client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from google.cloud.pubsub.subscription import Subscription
2626
from google.cloud.pubsub.topic import Topic
2727

28-
# pylint: disable=ungrouped-imports
2928
try:
3029
from google.cloud.pubsub._gax import _PublisherAPI as GAXPublisherAPI
3130
from google.cloud.pubsub._gax import _SubscriberAPI as GAXSubscriberAPI
@@ -39,7 +38,6 @@
3938
make_gax_subscriber_api = None
4039
else:
4140
_HAVE_GAX = True
42-
# pylint: enable=ungrouped-imports
4341

4442

4543
_DISABLE_GAX = os.getenv(DISABLE_GRPC, False)

scripts/pylintrc_default

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ confidence=
112112
# will be detected by our 100% code coverage.
113113
# - missing-raises-doc: New in PyLint 1.6, enforcing PEP 257 and flagged our
114114
# existing codebase. See #1968 for eventual fixes.
115+
# - ungrouped-imports: We share the 'google' namespace with third-party
116+
# packages. PEP 8 wants those to be separate from "local"
117+
# imports.
115118
disable =
116119
import-star-module-level,
117120
old-octal-literal,
@@ -173,6 +176,7 @@ disable =
173176
wrong-import-position,
174177
no-name-in-module,
175178
missing-raises-doc,
179+
ungrouped-imports,
176180

177181
[REPORTS]
178182

system_tests/pubsub.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
from grpc import StatusCode
2121
import httplib2
2222

23-
# pylint: disable=ungrouped-imports
2423
from google.cloud.environment_vars import PUBSUB_EMULATOR
2524
from google.cloud.pubsub import client
26-
# pylint: enable=ungrouped-imports
2725

2826
from retry import RetryInstanceState
2927
from retry import RetryResult

0 commit comments

Comments
 (0)