Showing 515 of 517 total issues
Function get_markets
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def get_markets(
self,
base_currencies: Optional[List[str]] = None,
quote_currencies: Optional[List[str]] = None,
spot_only: bool = 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
Avoid deeply nested control flow statements. Open
Open
if pair_fees.get(takerOrMaker) is not None:
trades[idx]["fee"] = {
"currency": self.get_pair_quote_currency(pair),
"cost": trade["cost"] * pair_fees[takerOrMaker],
"rate": pair_fees[takerOrMaker],
Function check_conflicting_settings
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def check_conflicting_settings(
config: Config,
section_old: Optional[str],
name_old: str,
section_new: Optional[str],
- 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
Consider simplifying this complex logical expression. Open
Open
if (
not self.strategy.use_custom_stoploss
and self.strategy.trailing_stop
and self.strategy.trailing_only_offset_is_reached
and self.strategy.trailing_stop_positive_offset is not None
Consider simplifying this complex logical expression. Open
Open
if (
(self._position_stacking or len(LocalTrade.bt_trades_open_pp[pair]) == 0)
and is_first
and current_time != end_date
and trade_dir is not None
Consider simplifying this complex logical expression. Open
Open
if PairLocks.use_db:
return PairLock.query_pair_locks(pair, now, side).all()
else:
locks = [
lock
Function __balance_get_est_stake
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __balance_get_est_stake(
Function _rpc_analysed_dataframe
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _rpc_analysed_dataframe(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function _rpc_add_lock
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _rpc_add_lock(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function is_pair_locked
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def is_pair_locked(
Function assert_df
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def assert_df(self, dataframe: DataFrame, df_len: int, df_close: float, df_date: datetime):
Function _rpc_analysed_history_full
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _rpc_analysed_history_full(
Function _call
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _call(self, method, apipath, params: Optional[dict] = None, data=None, files=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(