Showing 514 of 516 total issues
Function _calc_drawdown_series
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _calc_drawdown_series(
Function rename_futures_data
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def rename_futures_data(
Function calculate_fee_rate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def calculate_fee_rate(
Function lock_pair
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def lock_pair(
Function load_trades
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def load_trades(
Function _search_all_objects
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _search_all_objects(
Function price_to_precision
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def price_to_precision(self, pair: str, price: float, *, rounding_mode: int = ROUND) -> float:
Function price_to_precision
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def price_to_precision(
Function _get_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_params(
Function _get_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_params(
Function _args_to_config
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _args_to_config(
Function process_deprecated_setting
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def process_deprecated_setting(
Function _get_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_params(
Function process_removed_setting
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def process_removed_setting(
Function _get_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_params(
Function check_conflicting_settings
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def check_conflicting_settings(
Function api_get_backtest
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def api_get_backtest():
"""
Get backtesting result.
Returns Result after backtesting has been ran.
"""
- 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 start_api
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def start_api(self):
"""
Start API ... should be run in thread.
"""
rest_ip = self._config["api_server"]["listen_ip_address"]
- 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 __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
exchange,
pairlistmanager,
config: Config,
- 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 visit_Subscript
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def visit_Subscript(self, node):
if isinstance(node.slice, ast_comments.Constant):
if node.slice.value in StrategyUpdater.rename_dict:
# Replace the slice attributes with the values from rename_dict
node.slice.value = StrategyUpdater.rename_dict[node.slice.value]
- 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"