Skip to content

Commit b6b3cf6

Browse files
authored
change: enable wrong-import-order Pylint check (#935)
Per PEP8: Imports should be grouped in the following order: 1- Standard library imports. 2- Related third party imports. 3- Local application/library specific imports.
1 parent 798299a commit b6b3cf6

File tree

7 files changed

+6
-7
lines changed

7 files changed

+6
-7
lines changed

.pylintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ disable=
8686
import-error, # Since we run Pylint before any of our builds in tox, this will always fail
8787
protected-access, # TODO: Fix access
8888
abstract-method, # TODO: Fix abstract methods
89-
wrong-import-order, # TODO: Fix import order
9089
useless-object-inheritance, # TODO: Remove unnecessary imports
9190
cyclic-import, # TODO: Resolve cyclic imports
9291
no-self-use, # TODO: Convert methods to functions where appropriate

src/sagemaker/fw_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616

1717
import os
1818
import re
19-
import sagemaker.utils
2019
import shutil
2120
import tempfile
2221
from six.moves.urllib.parse import urlparse
2322

23+
import sagemaker.utils
2424
from sagemaker.utils import get_ecr_image_uri_prefix, ECR_URI_PATTERN
2525

2626
_TAR_SOURCE_FILENAME = "source.tar.gz"

src/sagemaker/git_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
from __future__ import absolute_import
1414

1515
import os
16-
import six
1716
import subprocess
1817
import tempfile
1918
import warnings
19+
import six
2020
from six.moves import urllib
2121

2222

src/sagemaker/local/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import tarfile
2929
import tempfile
3030

31-
from six.moves.urllib.parse import urlparse
3231
from threading import Thread
32+
from six.moves.urllib.parse import urlparse
3333

3434
import yaml
3535

src/sagemaker/predictor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
import codecs
1616
import csv
1717
import json
18-
import numpy as np
1918
import six
2019
from six import StringIO, BytesIO
20+
import numpy as np
2121

2222
from sagemaker.content_types import CONTENT_TYPE_JSON, CONTENT_TYPE_CSV, CONTENT_TYPE_NPY
2323
from sagemaker.session import Session

src/sagemaker/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
import time
2121
import warnings
2222

23+
import six
2324
import boto3
2425
import botocore.config
25-
import six
2626
import yaml
2727
from botocore.exceptions import ClientError
2828

src/sagemaker/user_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# language governing permissions and limitations under the License.
1313
from __future__ import absolute_import
1414

15-
import pkg_resources
1615
import platform
1716
import sys
17+
import pkg_resources
1818

1919
import boto3
2020
import botocore

0 commit comments

Comments
 (0)