Showing 517 of 517 total issues
Function _convert_dataframe_to_dict
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _convert_dataframe_to_dict(
Function file_dump_json
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def file_dump_json(filename: Path, data: Any, is_zip: bool = False, log: bool = True) -> None:
"""
Dump JSON data into a file
:param filename: file to create
:param is_zip: if file should be zip
- 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 order_filled
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def order_filled(
Function populate_any_indicators
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def populate_any_indicators(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Avoid deeply nested control flow statements. Open
if not isnan(current_rate):
prof = trade.calculate_profit(current_rate)
current_profit = prof.profit_ratio
current_profit_abs = prof.profit_abs
total_profit_abs = prof.total_profit
Function add_max_drawdown
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_max_drawdown(
Function check_entry_timeout
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def check_entry_timeout(
Avoid deeply nested control flow statements. Open
if len(reason_cust) > CUSTOM_TAG_MAX_LENGTH:
logger.warning(
f"Custom exit reason returned from "
f"custom_exit is too long and was trimmed"
f"to {CUSTOM_TAG_MAX_LENGTH} characters."
Function check_sell_timeout
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def check_sell_timeout(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def update(self, require_update: bool = True) -> None:
"""
Updates wallets from the configured version.
By default, updates from the exchange.
Update-skipping should only be used for user-invoked /balance calls, since
- 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 extract_data_and_train_model
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def extract_data_and_train_model(
Avoid deeply nested control flow statements. Open
if indicator not in self.dict_recursive:
self.dict_recursive[indicator] = {}
Function after_iteration
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def after_iteration(
self, model, epoch: int, evals_log: callback.TrainingCallback.EvalsLog
) -> bool:
if not self.activate:
return False
- 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 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
Function hyperopt_loss_function
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def hyperopt_loss_function(
Function _get_results_dict
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_results_dict(
Function _exit_trade
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _exit_trade(