Skip to content

Commit 806d966

Browse files
authored
Relax pycodestyle: import only allowed at the top
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.
1 parent 38894cc commit 806d966

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kubernetes/utils/create_from_yaml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
import sys
1616

1717
if sys.version_info.major < 3:
18-
from StringIO import StringIO
18+
from StringIO import StringIO # noqa: F406
1919
else:
20-
from io import StringIO
20+
from io import StringIO # noqa: F406
2121

2222
from os import path
2323

0 commit comments

Comments
 (0)