From 3dc5a7d299074f0fa45a4b7bb50ab446a8824a32 Mon Sep 17 00:00:00 2001 From: shauryaMi12 <99283577+shauryaMi12@users.noreply.github.com> Date: Thu, 16 Oct 2025 08:37:55 +0530 Subject: [PATCH] fix: typo in integration documentation: 'userd' -> 'used' (#2034) * Fix typo in integration docs: 'userd' -> 'used' * fix: pylint error in CI --------- Co-authored-by: Linlang --- docs/start/integration.rst | 2 +- scripts/data_collector/utils.py | 4 ++-- scripts/data_collector/yahoo/collector.py | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/start/integration.rst b/docs/start/integration.rst index a9eecc4ea..3ec2d2ea6 100644 --- a/docs/start/integration.rst +++ b/docs/start/integration.rst @@ -71,7 +71,7 @@ The Custom models need to inherit `qlib.model.base.Model <../reference/api.html# ) - Override the `predict` method - - The parameters must include the parameter `dataset`, which will be userd to get the test dataset. + - The parameters must include the parameter `dataset`, which will be used to get the test dataset. - Return the `prediction score`. - Please refer to `Model API <../reference/api.html#module-qlib.model.base>`_ for the parameter types of the fit method. - Code Example: In the following example, users need to use `LightGBM` to predict the label(such as `preds`) of test data `x_test` and return it. diff --git a/scripts/data_collector/utils.py b/scripts/data_collector/utils.py index f25b1ec7a..3c5081201 100644 --- a/scripts/data_collector/utils.py +++ b/scripts/data_collector/utils.py @@ -82,7 +82,7 @@ def get_calendar_list(bench_code="CSI300") -> List[pd.Timestamp]: if bench_code.upper() == "ALL": @deco_retry - def _get_calendar(month): + def _get_calendar_from_month(month): _cal = [] try: resp = requests.get( @@ -98,7 +98,7 @@ def get_calendar_list(bench_code="CSI300") -> List[pd.Timestamp]: month_range = pd.date_range(start="2000-01", end=pd.Timestamp.now() + pd.Timedelta(days=31), freq="M") calendar = [] for _m in month_range: - cal = _get_calendar(_m.strftime("%Y-%m")) + cal = _get_calendar_from_month(_m.strftime("%Y-%m")) if cal: calendar += cal calendar = list(filter(lambda x: x <= pd.Timestamp.now(), calendar)) diff --git a/scripts/data_collector/yahoo/collector.py b/scripts/data_collector/yahoo/collector.py index a1b4d64f6..82660f111 100644 --- a/scripts/data_collector/yahoo/collector.py +++ b/scripts/data_collector/yahoo/collector.py @@ -613,10 +613,6 @@ class YahooNormalize1min(YahooNormalize, ABC): def symbol_to_yahoo(self, symbol): raise NotImplementedError("rewrite symbol_to_yahoo") - @abc.abstractmethod - def _get_1d_calendar_list(self) -> Iterable[pd.Timestamp]: - raise NotImplementedError("rewrite _get_1d_calendar_list") - class YahooNormalizeUS: def _get_calendar_list(self) -> Iterable[pd.Timestamp]: