Showing 515 of 517 total issues
Function hyperopt_loss_function
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def hyperopt_loss_function(
Function hyperopt_loss_function
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def hyperopt_loss_function(
Avoid deeply nested control flow statements. Open
if indicator not in self.dict_recursive:
self.dict_recursive[indicator] = {}
Function merge_features
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def merge_features(
Function _process_exit_order
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _process_exit_order(
Function fit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def fit(self, data_dictionary: Dict[str, Any], dk: FreqaiDataKitchen, **kwargs):
"""
User customizable fit method
:param data_dictionary: dict = common data dictionary containing all train/test
features/labels/weights.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _on_step
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _on_step(self) -> bool:
local_info = self.locals["infos"][0]
if hasattr(self.training_env, "envs"):
tensorboard_metrics = self.training_env.envs[0].unwrapped.tensorboard_metrics
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _get_exit_for_signal
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_exit_for_signal(
Function _get_results_dict
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_results_dict(
Function extract_data_and_train_model
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def extract_data_and_train_model(
Function get_result_table
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_result_table(
Function _get_stake_amount_limit
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_stake_amount_limit(
Function clean_ohlcv_dataframe
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def clean_ohlcv_dataframe(
Function _download_pair_history
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _download_pair_history(
pair: str,
*,
datadir: Path,
exchange: Exchange,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _validate_pairdata
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _validate_pairdata(
Function _get_params
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_params(
Function _build_coroutine
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _build_coroutine(
Function adjust
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def adjust(self, pairs: List[str]) -> list:
"""
Filters out and sorts "pairs" according to Edge calculated pairs
"""
final = []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_analyzed_dataframe
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_analyzed_dataframe(self, pair: str, timeframe: str) -> Tuple[DataFrame, datetime]:
"""
Retrieve the analyzed dataframe. Returns the full dataframe in trade mode (live / dry),
and the last 1000 candles (up to the time evaluated at this moment) in all other modes.
:param pair: pair to get the data for
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _load_cached_data_for_updating
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _load_cached_data_for_updating(