Skip to content

Commit d78b796

Browse files
wcharginbileschi
authored andcommitted
pylint: remove g-import-not-at-top suppressions (#3022)
Summary: This is a Google-specific lint that we kind of just cargo cult around and don’t actually lint against in CI, which makes it less than useful. Generated with: ``` git ls-files -z '*.py' | xargs -0 sed -i \ -e 's/g-import-not-at-top,//' \ -e 's/,g-import-not-at-top//' \ -e 's/ *# pylint:.*=g-import-not-at-top$//' \ ; ``` Note: This cherry-pick only includes files under tensorboard/uploader 28 files from the original commit were omitted. Test Plan: Our standard lint still passes: ``` $ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 0 ``` wchargin-branch: unsuppress-nontop-imports
1 parent 5dc9983 commit d78b796

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tensorboard/uploader/exporter_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828

2929
try:
3030
# python version >= 3.3
31-
from unittest import mock # pylint: disable=g-import-not-at-top
31+
from unittest import mock
3232
except ImportError:
33-
import mock # pylint: disable=g-import-not-at-top,unused-import
33+
import mock # pylint: disable=unused-import
3434

3535

3636
from tensorboard.uploader.proto import export_service_pb2

tensorboard/uploader/uploader_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626

2727
try:
2828
# python version >= 3.3
29-
from unittest import mock # pylint: disable=g-import-not-at-top
29+
from unittest import mock
3030
except ImportError:
31-
import mock # pylint: disable=g-import-not-at-top,unused-import
31+
import mock # pylint: disable=unused-import
3232

3333
import tensorflow as tf
3434

tensorboard/uploader/util_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626

2727
try:
2828
# python version >= 3.3
29-
from unittest import mock # pylint: disable=g-import-not-at-top
29+
from unittest import mock
3030
except ImportError:
31-
import mock # pylint: disable=g-import-not-at-top,unused-import
31+
import mock # pylint: disable=unused-import
3232

3333

3434
from google.protobuf import timestamp_pb2

0 commit comments

Comments
 (0)