Skip to content

Commit

Permalink
black formating (black is upgraded in github)
Browse files Browse the repository at this point in the history
  • Loading branch information
you-n-g committed Apr 27, 2021
1 parent 95ef8ae commit 664159c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/benchmarks/TFT/data_formatters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def get_num_samples_for_calibration(self):
return -1, -1

def get_column_definition(self):
""""Returns formatted column definition in order expected by the TFT."""
"""Returns formatted column definition in order expected by the TFT."""

column_definition = self._column_definition

Expand Down
2 changes: 1 addition & 1 deletion qlib/contrib/backtest/position.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_cash(self):
return self.position["cash"]

def get_stock_amount_dict(self):
"""generate stock amount dict {stock_id : amount of stock} """
"""generate stock amount dict {stock_id : amount of stock}"""
d = {}
stock_list = self.get_stock_list()
for stock_code in stock_list:
Expand Down
2 changes: 1 addition & 1 deletion qlib/contrib/report/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class BaseGraph:
""""""
""" """

_name = None

Expand Down
4 changes: 2 additions & 2 deletions qlib/data/dataset/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __call__(self, df):


class TanhProcess(Processor):
""" Use tanh to process noise data"""
"""Use tanh to process noise data"""

def __call__(self, df):
def tanh_denoise(data):
Expand All @@ -144,7 +144,7 @@ def tanh_denoise(data):


class ProcessInf(Processor):
"""Process infinity """
"""Process infinity"""

def __call__(self, df):
def replace_inf(data):
Expand Down
4 changes: 2 additions & 2 deletions qlib/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class BaseModel(Serializable, metaclass=abc.ABCMeta):

@abc.abstractmethod
def predict(self, *args, **kwargs) -> object:
""" Make predictions after modeling things """
"""Make predictions after modeling things"""
pass

def __call__(self, *args, **kwargs) -> object:
""" leverage Python syntactic sugar to make the models' behaviors like functions """
"""leverage Python syntactic sugar to make the models' behaviors like functions"""
return self.predict(*args, **kwargs)


Expand Down
4 changes: 2 additions & 2 deletions qlib/portfolio/optimizer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@


class BaseOptimizer(abc.ABC):
""" Construct portfolio with a optimization related method """
"""Construct portfolio with a optimization related method"""

@abc.abstractmethod
def __call__(self, *args, **kwargs) -> object:
""" Generate a optimized portfolio allocation """
"""Generate a optimized portfolio allocation"""
pass

0 comments on commit 664159c

Please sign in to comment.