From a30c47c61bd92be000de268d58efe62e774852ec Mon Sep 17 00:00:00 2001 From: Nyakku Shigure Date: Mon, 10 Oct 2022 17:35:28 +0800 Subject: [PATCH] [CodeStyle][F401] remove unused imports in fluid/tests/test_*, book (#46716) --- python/paddle/fluid/tests/book/notest_understand_sentiment.py | 1 - python/paddle/fluid/tests/book/test_image_classification.py | 1 - python/paddle/fluid/tests/book/test_label_semantic_roles.py | 1 - python/paddle/fluid/tests/book/test_recognize_digits.py | 1 - python/paddle/fluid/tests/book/test_rnn_encoder_decoder.py | 2 -- python/paddle/fluid/tests/book/test_word2vec_book.py | 1 - python/paddle/fluid/tests/test_beam_search_decoder.py | 2 -- python/paddle/fluid/tests/test_error_clip.py | 1 - 8 files changed, 10 deletions(-) diff --git a/python/paddle/fluid/tests/book/notest_understand_sentiment.py b/python/paddle/fluid/tests/book/notest_understand_sentiment.py index 75b8be1cc3..f8e49fafac 100644 --- a/python/paddle/fluid/tests/book/notest_understand_sentiment.py +++ b/python/paddle/fluid/tests/book/notest_understand_sentiment.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from paddle.fluid.layers.device import get_places import unittest import paddle.fluid as fluid import paddle diff --git a/python/paddle/fluid/tests/book/test_image_classification.py b/python/paddle/fluid/tests/book/test_image_classification.py index e352a67352..c8a4861370 100644 --- a/python/paddle/fluid/tests/book/test_image_classification.py +++ b/python/paddle/fluid/tests/book/test_image_classification.py @@ -21,7 +21,6 @@ import numpy import unittest import os import tempfile -import numpy as np paddle.enable_static() diff --git a/python/paddle/fluid/tests/book/test_label_semantic_roles.py b/python/paddle/fluid/tests/book/test_label_semantic_roles.py index 118c0be4b0..16e4a28277 100644 --- a/python/paddle/fluid/tests/book/test_label_semantic_roles.py +++ b/python/paddle/fluid/tests/book/test_label_semantic_roles.py @@ -13,7 +13,6 @@ # limitations under the License. import contextlib -import math import numpy as np import os import time diff --git a/python/paddle/fluid/tests/book/test_recognize_digits.py b/python/paddle/fluid/tests/book/test_recognize_digits.py index 7980db4649..f2afcdefa0 100644 --- a/python/paddle/fluid/tests/book/test_recognize_digits.py +++ b/python/paddle/fluid/tests/book/test_recognize_digits.py @@ -22,7 +22,6 @@ import numpy import paddle import paddle.fluid as fluid -from paddle.fluid.layers.device import get_places paddle.enable_static() diff --git a/python/paddle/fluid/tests/book/test_rnn_encoder_decoder.py b/python/paddle/fluid/tests/book/test_rnn_encoder_decoder.py index 18972a378a..b7de6f5da9 100644 --- a/python/paddle/fluid/tests/book/test_rnn_encoder_decoder.py +++ b/python/paddle/fluid/tests/book/test_rnn_encoder_decoder.py @@ -15,9 +15,7 @@ import numpy as np import paddle import paddle.fluid as fluid -import paddle.fluid.core as core import paddle.fluid.framework as framework -import paddle.fluid.layers as layers import contextlib import math import sys diff --git a/python/paddle/fluid/tests/book/test_word2vec_book.py b/python/paddle/fluid/tests/book/test_word2vec_book.py index 194dfd8dae..ec7ab9cc83 100644 --- a/python/paddle/fluid/tests/book/test_word2vec_book.py +++ b/python/paddle/fluid/tests/book/test_word2vec_book.py @@ -14,7 +14,6 @@ import paddle import paddle.fluid as fluid -from paddle.fluid.layers.device import get_places import unittest import os import numpy as np diff --git a/python/paddle/fluid/tests/test_beam_search_decoder.py b/python/paddle/fluid/tests/test_beam_search_decoder.py index c57cddedb4..7458bf4c57 100644 --- a/python/paddle/fluid/tests/test_beam_search_decoder.py +++ b/python/paddle/fluid/tests/test_beam_search_decoder.py @@ -19,13 +19,11 @@ import contextlib import numpy as np import paddle import paddle.fluid as fluid -import paddle.fluid.core as core import paddle.fluid.framework as framework import paddle.fluid.layers as layers from paddle.fluid.executor import Executor from paddle.fluid.contrib.decoder.beam_search_decoder import * import unittest -import os paddle.enable_static() diff --git a/python/paddle/fluid/tests/test_error_clip.py b/python/paddle/fluid/tests/test_error_clip.py index 99dd196423..eac41b818c 100644 --- a/python/paddle/fluid/tests/test_error_clip.py +++ b/python/paddle/fluid/tests/test_error_clip.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import numpy as np import paddle import paddle.fluid as fluid -- GitLab