File tree Expand file tree Collapse file tree 8 files changed +4
-14
lines changed
datastore/google/cloud/datastore
logging/google/cloud/logging
pubsub/google/cloud/pubsub Expand file tree Collapse file tree 8 files changed +4
-14
lines changed Original file line number Diff line number Diff line change 3838from six .moves import http_client
3939from six .moves import configparser
4040
41- # pylint: disable=ungrouped-imports
4241from google .cloud .environment_vars import PROJECT
4342from google .cloud .environment_vars import CREDENTIALS
44- # pylint: enable=ungrouped-imports
4543
4644
4745_NOW = datetime .datetime .utcnow # To be replaced by tests.
Original file line number Diff line number Diff line change 2828from google .cloud .exceptions import GrpcRendezvous
2929from google .cloud .exceptions import make_exception
3030from google .cloud .datastore ._generated import datastore_pb2 as _datastore_pb2
31- # pylint: disable=ungrouped-imports
3231try :
3332 from grpc import StatusCode
3433 from google .cloud .datastore ._generated import datastore_grpc_pb2
3837 StatusCode = None
3938else :
4039 _HAVE_GRPC = True
41- # pylint: enable=ungrouped-imports
4240
4341
4442DATASTORE_API_HOST = 'datastore.googleapis.com'
Original file line number Diff line number Diff line change 2424from google .type import latlng_pb2
2525import six
2626
27- # pylint: disable=ungrouped-imports
2827from google .cloud ._helpers import _datetime_to_pb_timestamp
2928from google .cloud ._helpers import _pb_timestamp_to_datetime
3029from google .cloud .datastore ._generated import entity_pb2 as _entity_pb2
3130from google .cloud .datastore .entity import Entity
3231from google .cloud .datastore .key import Key
33- # pylint: enable=ungrouped-imports
3432
3533__all__ = ('entity_from_protobuf' , 'key_from_protobuf' )
3634
Original file line number Diff line number Diff line change 2727from google .protobuf .json_format import Parse
2828from grpc import StatusCode
2929
30- # pylint: disable=ungrouped-imports
3130from google .cloud ._helpers import _datetime_to_pb_timestamp
3231from google .cloud ._helpers import _pb_timestamp_to_rfc3339
3332from google .cloud .exceptions import Conflict
3433from google .cloud .exceptions import NotFound
35- # pylint: enable=ungrouped-imports
3634
3735
3836class _LoggingAPI (object ):
Original file line number Diff line number Diff line change 2525from grpc import insecure_channel
2626from grpc import StatusCode
2727
28- # pylint: disable=ungrouped-imports
2928from google .cloud ._helpers import _to_bytes
3029from google .cloud ._helpers import _pb_timestamp_to_rfc3339
3130from google .cloud .exceptions import Conflict
3231from google .cloud .exceptions import NotFound
33- # pylint: enable=ungrouped-imports
3432
3533
3634class _PublisherAPI (object ):
Original file line number Diff line number Diff line change 2525from google .cloud .pubsub .subscription import Subscription
2626from google .cloud .pubsub .topic import Topic
2727
28- # pylint: disable=ungrouped-imports
2928try :
3029 from google .cloud .pubsub ._gax import _PublisherAPI as GAXPublisherAPI
3130 from google .cloud .pubsub ._gax import _SubscriberAPI as GAXSubscriberAPI
3938 make_gax_subscriber_api = None
4039else :
4140 _HAVE_GAX = True
42- # pylint: enable=ungrouped-imports
4341
4442
4543_DISABLE_GAX = os .getenv (DISABLE_GRPC , False )
Original file line number Diff line number Diff 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.
115118disable =
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
Original file line number Diff line number Diff line change 2020from grpc import StatusCode
2121import httplib2
2222
23- # pylint: disable=ungrouped-imports
2423from google .cloud .environment_vars import PUBSUB_EMULATOR
2524from google .cloud .pubsub import client
26- # pylint: enable=ungrouped-imports
2725
2826from retry import RetryInstanceState
2927from retry import RetryResult
You can’t perform that action at this time.
0 commit comments