1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-13 15:56:57 +08:00

Fix typos and grammar errors in docstrings and comments (#1366)

* fix gramma error in doc strings

* fix typos in exchange.py

* fix typos and gramma errors

* fix typo and rename function param to avoid shading python keyword

* remove redundant parathesis; pass kwargs to parent class

* fix pyblack

* further correction

* assign -> be assigned to
This commit is contained in:
YQ Tsui
2022-11-20 14:15:59 +08:00
committed by GitHub
parent 0c4db8b0f8
commit cc01812c62
24 changed files with 77 additions and 72 deletions

View File

@@ -121,7 +121,7 @@ class LogCollector:
"""Log something with any type.
As it's an "any" object, the only LogWriter accepting it is pickle.
Therefore pickle must be able to serialize it.
Therefore, pickle must be able to serialize it.
"""
if loglevel < self._min_loglevel:
return
@@ -243,7 +243,7 @@ class LogWriter(Generic[ObsType, ActType]):
rewards
A list of rewards at each step of this episode.
contents
Logged contents for every steps.
Logged contents for every step.
"""
def log_step(self, reward: float, contents: Dict[str, Any]) -> None:
@@ -285,7 +285,7 @@ class LogWriter(Generic[ObsType, ActType]):
self.log_episode(self.episode_lengths[env_id], self.episode_rewards[env_id], self.episode_logs[env_id])
def on_env_reset(self, env_id: int, obs: ObsType) -> None:
def on_env_reset(self, env_id: int, _: ObsType) -> None:
"""Callback for finite env.
Reset episode statistics. Nothing task-specific is logged here because of