Skip to content

[CodeStyle][F401] remove unused import in unittests/test_[u-z] #46706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/paddle/fluid/tests/unittests/test_unbind_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import paddle
import paddle.fluid as fluid
import paddle.tensor as tensor
from paddle.fluid import compiler, Program, program_guard, core
from paddle.fluid import Program, program_guard
from paddle.fluid.framework import _test_eager_guard


Expand Down
1 change: 0 additions & 1 deletion python/paddle/fluid/tests/unittests/test_unfold_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import math
import numpy as np
import unittest
from op_test import OpTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@

import unittest
import numpy as np
from op_test import OpTest, convert_uint16_to_float, convert_float_to_uint16
from op_test import OpTest, convert_uint16_to_float
import paddle
import paddle.fluid.core as core
from paddle.fluid.op import Operator
import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
from paddle.fluid.tests.unittests.test_uniform_random_op import output_hist, output_hist_diag


Expand Down
2 changes: 0 additions & 2 deletions python/paddle/fluid/tests/unittests/test_uniform_random_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
import os
import subprocess
import unittest
import numpy as np
from op_test import OpTest
Expand Down
1 change: 0 additions & 1 deletion python/paddle/fluid/tests/unittests/test_unique.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid.op import Operator
from paddle.fluid.framework import _test_eager_guard


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import paddle
import paddle.fluid as fluid
import paddle.fluid.framework as framework


def reference_unique_consecutive(X, return_inverse=False, return_counts=False):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from op_test import OpTest
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid.op import Operator


class TestUniqueWithCountsOp(OpTest):
Expand Down
1 change: 0 additions & 1 deletion python/paddle/fluid/tests/unittests/test_unpool1d_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import unittest
import numpy as np
from op_test import OpTest
import paddle
import paddle.nn.functional as F

Expand Down
1 change: 0 additions & 1 deletion python/paddle/fluid/tests/unittests/test_unpool_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ class TestUnpoolOpAPI_dy3(unittest.TestCase):

def test_case(self):
import paddle
import paddle.nn.functional as F
import paddle.fluid.core as core
import paddle.fluid as fluid
import numpy as np
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/fluid/tests/unittests/test_var_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

import paddle.fluid as fluid
import numpy as np
import os
import shutil
import unittest


Expand Down
3 changes: 1 addition & 2 deletions python/paddle/fluid/tests/unittests/test_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
from functools import reduce

import paddle
from paddle.fluid.framework import default_main_program, Program, convert_np_dtype_to_dtype_, _non_static_mode
from paddle.fluid.framework import Program, convert_np_dtype_to_dtype_, default_main_program
import paddle
import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.fluid.core as core
import numpy as np

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@

import numpy as np

from op_test import OpTest
import paddle
from paddle.fluid.framework import _test_eager_guard, in_dygraph_mode
from paddle.fluid.framework import _test_eager_guard


# NOTE(pangyoki): Tensor View Strategy.
Expand Down
5 changes: 1 addition & 4 deletions python/paddle/fluid/tests/unittests/test_where_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
import numpy as np
import paddle
import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.fluid.core as core
from op_test import OpTest
from paddle.fluid import compiler, Program, program_guard
from paddle.fluid.op import Operator
from paddle.fluid import Program, program_guard
from paddle.fluid.backward import append_backward
from paddle.fluid.framework import _test_eager_guard

Expand Down
2 changes: 0 additions & 2 deletions python/paddle/fluid/tests/unittests/test_while_loop_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle.fluid.layers as layers
import paddle.fluid.framework as framework
from paddle.fluid.executor import Executor
from paddle.fluid.framework import Program, program_guard
from paddle.fluid.backward import append_backward

Expand Down
1 change: 0 additions & 1 deletion python/paddle/fluid/tests/unittests/test_while_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import paddle.fluid as fluid
from paddle.fluid.backward import append_backward
import numpy
from paddle.fluid import compiler, Program, program_guard

paddle.enable_static()

Expand Down
1 change: 0 additions & 1 deletion python/paddle/fluid/tests/unittests/test_yolo_box_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import numpy as np
from op_test import OpTest
import paddle
from paddle.fluid import core
from paddle.fluid.framework import _test_eager_guard


Expand Down
2 changes: 1 addition & 1 deletion python/paddle/fluid/tests/unittests/test_zeros_like_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import paddle
import paddle.fluid as fluid
from paddle import zeros_like
from paddle import _C_ops, _legacy_C_ops
from paddle import _C_ops
from paddle.fluid import core, Program, program_guard
from paddle.fluid.framework import _test_eager_guard
from paddle.fluid.framework import convert_np_dtype_to_dtype_
Expand Down
5 changes: 1 addition & 4 deletions python/paddle/fluid/tests/unittests/test_zeros_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@

import unittest
import numpy as np
from op_test import OpTest
import paddle
import paddle.compat as cpt
import paddle.fluid.core as core
from paddle.fluid.op import Operator
import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard
from paddle.fluid import Program, program_guard
from paddle.fluid.framework import _test_eager_guard


Expand Down