diff --git a/paddlehub/commands/base_command.py b/paddlehub/commands/base_command.py index 8563d8c138b7c7d759db31122e32a633127ee22e..1d08525912789114d3e09464a749a6b34dd282b4 100644 --- a/paddlehub/commands/base_command.py +++ b/paddlehub/commands/base_command.py @@ -23,7 +23,7 @@ from paddlehub.common.arg_helper import add_argument, print_arguments ENTRY = "hub" -class BaseCommand: +class BaseCommand(object): command_dict = {} @classmethod diff --git a/paddlehub/commands/cml_utils.py b/paddlehub/commands/cml_utils.py index 5b2fb908ab4f12188698ce1ab18fc58c57a8ca15..74dcc382ecfe84c30c1fd64c8cd6684b6616e22b 100644 --- a/paddlehub/commands/cml_utils.py +++ b/paddlehub/commands/cml_utils.py @@ -61,7 +61,7 @@ def get_ph_value(): return 11 -class TablePrinter: +class TablePrinter(object): def __init__(self, titles, placeholders, diff --git a/paddlehub/common/downloader.py b/paddlehub/common/downloader.py index 3194944ffc295e91a95538e4fd9d5b6dafa46c6e..b82cb61937bf69e813f396995e01358e28948e4e 100644 --- a/paddlehub/common/downloader.py +++ b/paddlehub/common/downloader.py @@ -45,7 +45,7 @@ def progress(str, end=False): sys.stdout.flush() -class Downloader: +class Downloader(object): def download_file(self, url, save_path, diff --git a/paddlehub/common/hub_server.py b/paddlehub/common/hub_server.py index 6f48c978c8ccb14b79f8700f5b1ef7c1f4452a0a..b52cf55e0c2c97009f3bf3949fe2fcd733fdb64d 100644 --- a/paddlehub/common/hub_server.py +++ b/paddlehub/common/hub_server.py @@ -29,7 +29,7 @@ RESOURCE_LIST_FILE = "resource_list_file.yml" CACHE_TIME = 60 * 10 -class HubServer: +class HubServer(object): def __init__(self, server_url=None): if not server_url: server_url = "https://paddlehub.bj.bcebos.com/" diff --git a/paddlehub/dataset/base_cv_dataset.py b/paddlehub/dataset/base_cv_dataset.py index 07b050c700490f8c5bc2a226d5091a804df3d561..053dda3b85467da0db34e5f3440872bdd36c8ca6 100644 --- a/paddlehub/dataset/base_cv_dataset.py +++ b/paddlehub/dataset/base_cv_dataset.py @@ -22,7 +22,7 @@ import paddlehub as hub from paddlehub.common.downloader import default_downloader -class ImageClassificationDataset: +class ImageClassificationDataset(object): def __init__(self): self.base_path = None self.train_list_file = None diff --git a/paddlehub/io/parser.py b/paddlehub/io/parser.py index 8cebcec77657a2e91137038408476949a53d5def..d332d7f1fa30a5aa91553f8f4175d4d612da3574 100644 --- a/paddlehub/io/parser.py +++ b/paddlehub/io/parser.py @@ -19,7 +19,7 @@ from __future__ import print_function import yaml -class CSVFileParser: +class CSVFileParser(object): def __init__(self): pass @@ -46,7 +46,7 @@ class CSVFileParser: return self.content -class YAMLFileParser: +class YAMLFileParser(object): def __init__(self): pass @@ -59,7 +59,7 @@ class YAMLFileParser: return yaml.load(content, Loader=yaml.BaseLoader) -class TextFileParser: +class TextFileParser(object): def __init__(self): pass diff --git a/paddlehub/module/base_processor.py b/paddlehub/module/base_processor.py index 90e21c3be106543c2e008f8bce767935151c37bb..72da4a8ca621cabd6f14d512773fd880b914608e 100644 --- a/paddlehub/module/base_processor.py +++ b/paddlehub/module/base_processor.py @@ -17,7 +17,7 @@ from __future__ import division from __future__ import print_function -class BaseProcessor: +class BaseProcessor(object): def __init__(self, module): pass diff --git a/paddlehub/module/checker.py b/paddlehub/module/checker.py index 3e4ca6a1c90e1bfeba6a9197753b1fba6973c6ff..bab8ff6fb30fc386f8527c618ddbf3c68cbb715f 100644 --- a/paddlehub/module/checker.py +++ b/paddlehub/module/checker.py @@ -29,7 +29,7 @@ CHECK_INFO_PB_FILENAME = "check_info.pb" FILE_SEP = "/" -class ModuleChecker: +class ModuleChecker(object): def __init__(self, module_path): self.module_path = module_path diff --git a/paddlehub/module/manager.py b/paddlehub/module/manager.py index c013c2ade876a6408d18525cc73efec943885632..06db32a11989a4134361259b2539fb371a020740 100644 --- a/paddlehub/module/manager.py +++ b/paddlehub/module/manager.py @@ -25,7 +25,7 @@ from paddlehub.common.dir import MODULE_HOME import paddlehub as hub -class LocalModuleManager: +class LocalModuleManager(object): def __init__(self, module_home=None): self.local_modules_dir = module_home if module_home else MODULE_HOME self.modules_dict = {} diff --git a/paddlehub/module/signature.py b/paddlehub/module/signature.py index cc45229951a705552555449d25d29ca64a604fc5..93150c0a679806cf6b633581243b4431bffcb275 100644 --- a/paddlehub/module/signature.py +++ b/paddlehub/module/signature.py @@ -21,7 +21,7 @@ from paddle.fluid.framework import Variable from paddlehub.common.utils import to_list -class Signature: +class Signature(object): def __init__(self, name, inputs, diff --git a/paddlehub/reader/cv_reader.py b/paddlehub/reader/cv_reader.py index 0b8e37dbdcc1aec88e164a372fb23a8b99e009d5..aeeec007a38b49afd575353bdf4912d4aaec0d31 100644 --- a/paddlehub/reader/cv_reader.py +++ b/paddlehub/reader/cv_reader.py @@ -32,7 +32,7 @@ color_mode_dict = { } -class ImageClassificationReader: +class ImageClassificationReader(object): def __init__(self, image_width, image_height,