提交 61f96444 编写于 作者: W wuzewu

All classes inherit from object

上级 65d4e626
......@@ -23,7 +23,7 @@ from paddlehub.common.arg_helper import add_argument, print_arguments
ENTRY = "hub"
class BaseCommand:
class BaseCommand(object):
command_dict = {}
@classmethod
......
......@@ -61,7 +61,7 @@ def get_ph_value():
return 11
class TablePrinter:
class TablePrinter(object):
def __init__(self,
titles,
placeholders,
......
......@@ -45,7 +45,7 @@ def progress(str, end=False):
sys.stdout.flush()
class Downloader:
class Downloader(object):
def download_file(self,
url,
save_path,
......
......@@ -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/"
......
......@@ -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
......
......@@ -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
......
......@@ -17,7 +17,7 @@ from __future__ import division
from __future__ import print_function
class BaseProcessor:
class BaseProcessor(object):
def __init__(self, module):
pass
......
......@@ -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
......
......@@ -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 = {}
......
......@@ -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,
......
......@@ -32,7 +32,7 @@ color_mode_dict = {
}
class ImageClassificationReader:
class ImageClassificationReader(object):
def __init__(self,
image_width,
image_height,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册