mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-02 10:31:00 +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
|
||||
strategy_file = self.data_path / user_id / "strategy_{}.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:
|
||||
raise ValueError("User {} has been loaded".format(user_id))
|
||||
else:
|
||||
|
||||
@@ -161,7 +161,7 @@ class DistplotGraph(BaseGraph):
|
||||
"""
|
||||
_t_df = self._df.dropna()
|
||||
_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)
|
||||
|
||||
return _fig["data"]
|
||||
|
||||
@@ -16,7 +16,7 @@ def get_path_list(path):
|
||||
if isinstance(path, str):
|
||||
return [path]
|
||||
else:
|
||||
return [p for p in path]
|
||||
return list(path)
|
||||
|
||||
|
||||
def sys_config(config, config_path):
|
||||
|
||||
Reference in New Issue
Block a user