Showing 514 of 516 total issues
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 _params_update_for_json
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _params_update_for_json(result_dict, params, non_optimized, space: str) -> None:
if (space in params) or (space in non_optimized):
space_params = HyperoptTools._space_params(params, space)
space_non_optimized = HyperoptTools._space_params(non_optimized, space)
all_space_params = space_params
- 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 append_model_predictions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def append_model_predictions(
Function _get_exit_for_signal
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_exit_for_signal(
Function make_train_test_datasets
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def make_train_test_datasets(
self, filtered_dataframe: DataFrame, labels: DataFrame
) -> Dict[Any, Any]:
"""
Given the dataframe for the full history for training, split the data into
- 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
Avoid deeply nested control flow statements. Open
if indicator not in self.dict_recursive:
self.dict_recursive[indicator] = {}
Function _throttle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _throttle(
Function hyperopt_loss_function
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def hyperopt_loss_function(
Function print_results
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def print_results(
Function _load_cached_data_for_updating
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _load_cached_data_for_updating(
Function calculate_max_drawdown
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def calculate_max_drawdown(
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_params
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_params(
Function update_from_ccxt_object
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def update_from_ccxt_object(self, order):
"""
Update Order from ccxt response
Only updates if fields are available from ccxt -
"""
- 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 _check_empty_df
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _check_empty_df(
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 _build_coroutine
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _build_coroutine(
Function _fetch_and_calculate_funding_fees
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _fetch_and_calculate_funding_fees(