Skip to content
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

[CodeStyle] remove all future import #46411

Merged
merged 4 commits into from
Sep 27, 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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

from full_pascalvoc_test_preprocess import main_pascalvoc_preprocess
import numpy as np
import paddle.fluid.core as core
Expand All @@ -23,6 +21,7 @@


class Test_Preprocess(unittest.TestCase):

def test_local_convert(self):
os.system("python full_pascalvoc_test_preprocess.py --choice=local")

Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/cifar.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

"""

from __future__ import print_function

import itertools
import numpy
import paddle.dataset.common
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import requests
import hashlib
import os
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/conll05.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
to initialize SRL model.
"""

from __future__ import print_function

import tarfile
import gzip
import itertools
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/flowers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

"""

from __future__ import print_function

import itertools
import functools
from .common import download
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
be keep consistent between the training and inference period.
"""

from __future__ import print_function

import six
import numpy as np
# FIXME(minqiyang): this is an ugly fix for the numpy bug reported here
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/imdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
Besides, this module also provides API for building dictionary.
"""

from __future__ import print_function

import paddle.dataset.common
import paddle.utils.deprecated as deprecated
import collections
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/imikolov.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
into paddle reader creators.
"""

from __future__ import print_function

import paddle.dataset.common
import paddle.utils.deprecated as deprecated
import collections
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
parse training set and test set into paddle reader creators.
"""

from __future__ import print_function

import paddle.dataset.common
import paddle.utils.deprecated as deprecated
import gzip
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/movielens.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

"""

from __future__ import print_function

import numpy as np
import zipfile
import paddle.dataset.common
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/tests/cifar_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import paddle.dataset.cifar
import unittest

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

from __future__ import print_function

import paddle.dataset.flowers
import unittest

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

from __future__ import print_function

import paddle.dataset.imdb
import unittest
import re
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/tests/imikolov_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import paddle.dataset.imikolov
import unittest

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

from __future__ import print_function

import paddle.dataset.mnist
import unittest

Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

from __future__ import print_function

import paddle.dataset.voc2012
import unittest

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

from __future__ import print_function

import paddle.dataset.wmt16
import unittest

Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/uci_housing.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
parse training set and test set into paddle reader creators.
"""

from __future__ import print_function

import numpy as np
import six
import tempfile
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/voc2012.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
with segmentation has been increased from 7,062 to 9,993.
"""

from __future__ import print_function

import tarfile
import io
import numpy as np
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/wmt14.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

"""

from __future__ import print_function

import six
import tarfile
import gzip
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/dataset/wmt16.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
}
"""

from __future__ import print_function

import os
import six
import tarfile
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/distributed/entry_attr.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

__all__ = []


Expand Down
1 change: 0 additions & 1 deletion python/paddle/distributed/fleet/base/topology.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.

from __future__ import print_function
import sys
import paddle
import collections
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/distributed/fleet/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
your_training_py (arg1 arg2 and all others)
"""

from __future__ import print_function

import shutil
import sys
import tempfile
Expand Down
1 change: 0 additions & 1 deletion python/paddle/distributed/fleet/meta_optimizers/common.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.

from __future__ import print_function
import os

import paddle.fluid as fluid
Expand Down
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.

from __future__ import print_function
import sys
from paddle.optimizer import Optimizer
from ...base.topology import ParallelMode
Expand Down
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.

from __future__ import print_function
import sys
import paddle
from paddle.optimizer import Optimizer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import paddle
from paddle.fluid import program_guard, layers, default_main_program
from paddle.fluid import default_startup_program
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and

from __future__ import print_function
from __future__ import division
import os

import paddle.fluid as fluid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and

from __future__ import print_function
from __future__ import division
import os
import collections
import numpy as np
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and

from __future__ import print_function
from __future__ import division

import paddle.fluid as fluid
from paddle.fluid import core, unique_name
from .meta_optimizer_base import MetaOptimizerBase
Expand Down
1 change: 0 additions & 1 deletion python/paddle/distributed/ps/utils/public.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.

from __future__ import print_function
from functools import reduce

import collections
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/distributed/spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division

import multiprocessing
import os
import signal
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/distribution/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# 'sampling_id',
# 'Uniform']

from __future__ import print_function

import math
import warnings

Expand Down
1 change: 0 additions & 1 deletion python/paddle/fluid/__init__.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.

from __future__ import print_function
import os
import sys
import atexit
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/fluid/average.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import numpy as np
import warnings
"""
Expand Down
1 change: 0 additions & 1 deletion python/paddle/fluid/backward.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.

from __future__ import print_function
from .proto import framework_pb2

from paddle.fluid import framework as framework
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/fluid/clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import copy
import six
import warnings
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/fluid/contrib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

from . import decoder
from .decoder import *
from . import memory_usage_calc
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/fluid/contrib/decoder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

from . import beam_search_decoder
from .beam_search_decoder import *

Expand Down
2 changes: 0 additions & 2 deletions python/paddle/fluid/contrib/decoder/beam_search_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
This API is still under active development and may change drastically.
"""

from __future__ import print_function

from ...wrapped_decorator import signature_safe_contextmanager
import numpy as np
import six
Expand Down
1 change: 0 additions & 1 deletion python/paddle/fluid/contrib/extend_optimizer/__init__.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.

from __future__ import print_function
from . import extend_optimizer_with_weight_decay
from .extend_optimizer_with_weight_decay import *

Expand Down
2 changes: 0 additions & 2 deletions python/paddle/fluid/contrib/layers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

from . import nn
from .nn import *

Expand Down
Loading