mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-13 15:56:57 +08:00
Remove unnecessary use of comprehension
Signed-off-by: shubhendra <withshubh@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ class UserManager:
|
|||||||
account_path = self.data_path / user_id
|
account_path = self.data_path / user_id
|
||||||
strategy_file = self.data_path / user_id / "strategy_{}.pickle".format(user_id)
|
strategy_file = self.data_path / user_id / "strategy_{}.pickle".format(user_id)
|
||||||
model_file = self.data_path / user_id / "model_{}.pickle".format(user_id)
|
model_file = self.data_path / user_id / "model_{}.pickle".format(user_id)
|
||||||
cur_user_list = [user_id for user_id in self.users]
|
cur_user_list = list(self.users)
|
||||||
if user_id in cur_user_list:
|
if user_id in cur_user_list:
|
||||||
raise ValueError("User {} has been loaded".format(user_id))
|
raise ValueError("User {} has been loaded".format(user_id))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ class DistplotGraph(BaseGraph):
|
|||||||
"""
|
"""
|
||||||
_t_df = self._df.dropna()
|
_t_df = self._df.dropna()
|
||||||
_data_list = [_t_df[_col] for _col in self._name_dict]
|
_data_list = [_t_df[_col] for _col in self._name_dict]
|
||||||
_label_list = [_name for _name in self._name_dict.values()]
|
_label_list = list(self._name_dict.values())
|
||||||
_fig = create_distplot(_data_list, _label_list, show_rug=False, **self._graph_kwargs)
|
_fig = create_distplot(_data_list, _label_list, show_rug=False, **self._graph_kwargs)
|
||||||
|
|
||||||
return _fig["data"]
|
return _fig["data"]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ def get_path_list(path):
|
|||||||
if isinstance(path, str):
|
if isinstance(path, str):
|
||||||
return [path]
|
return [path]
|
||||||
else:
|
else:
|
||||||
return [p for p in path]
|
return list(path)
|
||||||
|
|
||||||
|
|
||||||
def sys_config(config, config_path):
|
def sys_config(config, config_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user