1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-05 20:11:08 +08:00

black format

This commit is contained in:
bxdd
2020-12-10 09:02:43 +00:00
parent 0be57d51be
commit 87cc52cd05
2 changed files with 6 additions and 2 deletions

View File

@@ -729,13 +729,16 @@ def load_dataset(path_or_obj):
return pd.read_csv(path_or_obj, parse_dates=True, index_col=[0, 1])
raise ValueError(f"unsupported file type `{extension}`")
#################### Operator Wrapper #####################
class OpsWrapper(object):
"""Ops Wrapper"""
def __init__(self):
self._ops = {}
def register(self, ops_list):
for operator in ops_list:
@@ -744,4 +747,4 @@ class OpsWrapper(object):
def __getattr__(self, key):
if self._ops is {}:
raise AttributeError("Please run qlib.init() first using qlib to register ops")
return self._ops[key]
return self._ops[key]