Skip to content

Commit

Permalink
Relax pycodestyle: import only allowed at the top
Browse files Browse the repository at this point in the history
While this is a really good convention, sometimes one must import
stuff inside a try except block. This block is still at the top, but pycodestyle
treats like it isn't, because it's in an idented block, and the outeer scope.
  • Loading branch information
oz123 committed Apr 9, 2019
1 parent 38894cc commit 1db636c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kubernetes/utils/create_from_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
import re
import sys

if sys.version_info.major < 3:
from StringIO import StringIO
else:
from io import StringIO

from os import path

import yaml

from kubernetes import client

if sys.version_info.major < 3:
from StringIO import StringIO # noqa: F406
else:
from io import StringIO # noqa: F406


def create_from_yaml(
k8s_client,
Expand Down

0 comments on commit 1db636c

Please sign in to comment.