From 715b9d669115b7fea59c54bff992c11ca9cd734b Mon Sep 17 00:00:00 2001 From: Shuangchi He <34329208+Yulv-git@users.noreply.github.com> Date: Mon, 10 Oct 2022 17:53:57 +0800 Subject: [PATCH] [CodeStyle] remove all future import. (#46736) --- .../paddle/fluid/contrib/slim/tests/test_imperative_qat_lsq.py | 2 -- .../fluid/tests/unittests/mkldnn/test_fc_int8_mkldnn_op.py | 2 -- .../paddle/fluid/tests/unittests/mlu/test_huber_loss_op_mlu.py | 2 -- python/paddle/fluid/tests/unittests/mlu/test_yolo_box_op_mlu.py | 1 - .../fluid/tests/unittests/xpu/test_index_select_op_xpu.py | 1 - python/setup.py.in | 2 +- 6 files changed, 1 insertion(+), 9 deletions(-) diff --git a/python/paddle/fluid/contrib/slim/tests/test_imperative_qat_lsq.py b/python/paddle/fluid/contrib/slim/tests/test_imperative_qat_lsq.py index 07600425866..8269abbab4d 100644 --- a/python/paddle/fluid/contrib/slim/tests/test_imperative_qat_lsq.py +++ b/python/paddle/fluid/contrib/slim/tests/test_imperative_qat_lsq.py @@ -12,8 +12,6 @@ # see the license for the specific language governing permissions and # limitations under the license. -from __future__ import print_function - import os import numpy as np import random diff --git a/python/paddle/fluid/tests/unittests/mkldnn/test_fc_int8_mkldnn_op.py b/python/paddle/fluid/tests/unittests/mkldnn/test_fc_int8_mkldnn_op.py index ebbbab7f3b3..5cecbf159cc 100644 --- a/python/paddle/fluid/tests/unittests/mkldnn/test_fc_int8_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/mkldnn/test_fc_int8_mkldnn_op.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - import unittest import numpy as np from paddle.fluid.tests.unittests.op_test import OpTest, OpTestTool diff --git a/python/paddle/fluid/tests/unittests/mlu/test_huber_loss_op_mlu.py b/python/paddle/fluid/tests/unittests/mlu/test_huber_loss_op_mlu.py index 6839f8ab6f0..40e0dab0803 100644 --- a/python/paddle/fluid/tests/unittests/mlu/test_huber_loss_op_mlu.py +++ b/python/paddle/fluid/tests/unittests/mlu/test_huber_loss_op_mlu.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - import unittest import numpy as np import sys diff --git a/python/paddle/fluid/tests/unittests/mlu/test_yolo_box_op_mlu.py b/python/paddle/fluid/tests/unittests/mlu/test_yolo_box_op_mlu.py index 443ad4b2236..86bc314eafc 100644 --- a/python/paddle/fluid/tests/unittests/mlu/test_yolo_box_op_mlu.py +++ b/python/paddle/fluid/tests/unittests/mlu/test_yolo_box_op_mlu.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import division import sys sys.path.append("..") diff --git a/python/paddle/fluid/tests/unittests/xpu/test_index_select_op_xpu.py b/python/paddle/fluid/tests/unittests/xpu/test_index_select_op_xpu.py index 766ebdd2567..3eb8ff49f7f 100644 --- a/python/paddle/fluid/tests/unittests/xpu/test_index_select_op_xpu.py +++ b/python/paddle/fluid/tests/unittests/xpu/test_index_select_op_xpu.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import unittest import sys import paddle.fluid as fluid diff --git a/python/setup.py.in b/python/setup.py.in index 0e25a34f801..35da6880b2b 100755 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -233,7 +233,7 @@ os.environ['CUDA_CACHE_MAXSIZE'] = '805306368' write_cuda_env_config_py(filename='@PADDLE_BINARY_DIR@/python/paddle/cuda_env.py') def write_distributed_training_mode_py(filename='paddle/fluid/incubate/fleet/parameter_server/version.py'): - cnt = '''from __future__ import print_function + cnt = ''' # THIS FILE IS GENERATED FROM PADDLEPADDLE SETUP.PY -- GitLab