File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 2727
2828from gcloud .environment_vars import PROJECT
2929
30- # pylint: disable=wrong-import-position
3130try :
3231 from google .appengine .api import app_identity
3332except ImportError :
3433 app_identity = None
35- # pylint: enable=wrong-import-position
3634
3735
3836_NOW = datetime .datetime .utcnow # To be replaced by tests.
Original file line number Diff line number Diff line change 3232 class _GAECreds (object ):
3333 """Dummy class if not in App Engine environment."""
3434
35- # pylint: disable=wrong-import-position
3635try :
3736 from google .appengine .api import app_identity
3837except ImportError :
@@ -41,7 +40,6 @@ class _GAECreds(object):
4140from gcloud ._helpers import UTC
4241from gcloud ._helpers import _NOW
4342from gcloud ._helpers import _microseconds_from_datetime
44- # pylint: enable=wrong-import-position
4543
4644
4745def get_credentials ():
Original file line number Diff line number Diff line change @@ -85,6 +85,16 @@ load-plugins=pylint.extensions.check_docs
8585# return int(value)
8686# else:
8787# return float(value)
88+ # - wrong-import-position: This error is overzealous. It assumes imports are
89+ # completed whenever something non-trivial is
90+ # defined, e.g.
91+ # try:
92+ # from foo import Bar
93+ # except ImportError:
94+ # class Bar(object):
95+ # """Hi everyone"""
96+ # and thus causes subsequent imports to be
97+ # diagnosed as out-of-order.
8898disable =
8999 maybe-no-member,
90100 no-member,
@@ -94,6 +104,7 @@ disable =
94104 star-args,
95105 method-hidden,
96106 redefined-variable-type,
107+ wrong-import-position,
97108
98109
99110[REPORTS]
You can’t perform that action at this time.
0 commit comments