Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Commit 2c8cb0f

Browse files
committed
Correct import ordering
1 parent ce61978 commit 2c8cb0f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

config/kube_config.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,19 @@
1919
import os
2020
import tempfile
2121

22-
import oauthlib.oauth2
22+
from six import PY3
23+
2324
import google.auth
2425
import google.auth.transport.requests
26+
import oauthlib.oauth2
2527
import urllib3
2628
import yaml
27-
28-
from six import PY3
29-
3029
from kubernetes.client import ApiClient, ConfigurationObject, configuration
30+
from requests_oauthlib import OAuth2Session
3131

3232
from .config_exception import ConfigException
3333
from .dateutil import UTC, format_rfc3339, parse_rfc3339
3434

35-
from requests_oauthlib import OAuth2Session
36-
3735
EXPIRY_SKEW_PREVENTION_DELAY = datetime.timedelta(minutes=5)
3836
KUBE_CONFIG_DEFAULT_LOCATION = os.environ.get('KUBECONFIG', '~/.kube/config')
3937
_temp_files = {}
@@ -250,7 +248,7 @@ def _load_oid_token(self):
250248
expire = jwt_attributes.get('exp')
251249

252250
if ((expire is not None) and
253-
(_is_expired(datetime.datetime.fromtimestamp(expire)))):
251+
(_is_expired(datetime.datetime.fromtimestamp(expire)))):
254252
self._refresh_oidc(provider)
255253

256254
self.token = "Bearer %s" % provider['config']['id-token']

0 commit comments

Comments
 (0)