Skip to content

Commit

Permalink
fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
qianyun210603 committed Oct 2, 2023
1 parent 16691b5 commit e3dee30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion qlib/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ def list_instruments(self, instruments, start_time=None, end_time=None, freq="da
end of the time range.
as_list : bool
return instruments as list or dict.
freq: str
Returns
-------
Expand Down Expand Up @@ -359,6 +360,8 @@ def period_feature(
Parameters
----------
instrument: str
field: str
start_index: int
start_index is a relative index to the latest period to cur_time
Expand All @@ -372,6 +375,7 @@ def period_feature(
This is used for query specific period.
The period is represented with int in Qlib. (e.g. 202001 may represent the first quarter in 2020)
NOTE: `period` will override `start_index` and `end_index`
cur_time: pd.Timestamp
Returns
-------
Expand Down Expand Up @@ -1161,7 +1165,6 @@ def __init__(self, align_time: bool = True):
self.align_time = align_time

def dataset(self, instruments, fields, start_time=None, end_time=None, freq="day", inst_processors=[], **_):
instruments_d = self.get_instruments_d(instruments, freq)
column_names = self.get_column_names(fields)
if self.align_time:
# NOTE: if the frequency is a fixed value.
Expand Down Expand Up @@ -1234,6 +1237,9 @@ def calendar(self, start_time=None, end_time=None, freq="day", future=False):
result = self.queue.get(timeout=C["timeout"])
return result

def load_calendar(self, freq, future):
pass


class ClientInstrumentProvider(InstrumentProvider):
"""Client instrument data provider class
Expand Down

0 comments on commit e3dee30

Please sign in to comment.