1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-10 14:26:56 +08:00

Reformat code with black.

This commit is contained in:
Charles Young
2021-02-22 10:29:29 +08:00
parent b8647c13c7
commit 2f9d45e03a
56 changed files with 218 additions and 713 deletions

View File

@@ -40,9 +40,7 @@ class TestDumpData(unittest.TestCase):
TestDumpData.STOCK_NAMES = list(map(lambda x: x.name[:-4].upper(), SOURCE_DIR.glob("*.csv")))
provider_uri = str(QLIB_DIR.resolve())
qlib.init(
provider_uri=provider_uri,
expression_cache=None,
dataset_cache=None,
provider_uri=provider_uri, expression_cache=None, dataset_cache=None,
)
@classmethod
@@ -54,10 +52,7 @@ class TestDumpData(unittest.TestCase):
def test_1_dump_calendars(self):
ori_calendars = set(
map(
pd.Timestamp,
pd.read_csv(QLIB_DIR.joinpath("calendars", "day.txt"), header=None).loc[:, 0].values,
)
map(pd.Timestamp, pd.read_csv(QLIB_DIR.joinpath("calendars", "day.txt"), header=None).loc[:, 0].values,)
)
res_calendars = set(D.calendar())
assert len(ori_calendars - res_calendars) == len(res_calendars - ori_calendars) == 0, "dump calendars failed"