Showing 535 of 535 total issues
Function create_order
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_order(
Function load_data
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def load_data(
datadir: Path,
timeframe: str,
pairs: List[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
Function _flat_vars_to_nested_dict
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _flat_vars_to_nested_dict(env_dict: Dict[str, Any], prefix: str) -> Dict[str, Any]:
"""
Environment variables must be prefixed with FREQTRADE.
FREQTRADE__{section}__{key}
:param env_dict: Dictionary to validate - usually os.environ
- 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 additional_exchange_init
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def additional_exchange_init(self) -> None:
"""
Additional exchange initialization logic.
.api will be available at this point.
Must be overridden in child methods if required.
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
config: Config,
*,
exchange_config: Optional[ExchangeConfig] = None,
- 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 _fetch_stop_order_fallback
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _fetch_stop_order_fallback(self, order_id: str, pair: str) -> Dict:
params2 = {"stop": True, "ordType": "conditional"}
for method in (
self._api.fetch_open_orders,
self._api.fetch_closed_orders,
- 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 export_csv_file
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def export_csv_file(config: Config, results: list, csv_file: str) -> None:
"""
Log result to csv-file
"""
if not results:
Function confirm_trade_entry
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def confirm_trade_entry(
Function ft_stoploss_adjust
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def ft_stoploss_adjust(
Function leverage
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def leverage(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _enter_trade
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _enter_trade(
Function create_dry_run_order
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_dry_run_order(
Function print_results
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def print_results(
Function ohlcv_load
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def ohlcv_load(
Function get_valid_enter_price_and_stake
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_valid_enter_price_and_stake(
Function create_order
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_order(
Function _rpc_balance
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def _rpc_balance(self, stake_currency: str, fiat_display_currency: str) -> Dict:
"""Returns current account balance per crypto"""
currencies: List[Dict] = []
total = 0.0
total_bot = 0.0
Function __balance_get_est_stake
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __balance_get_est_stake(
self, coin: str, stake_currency: str, amount: float, balance: Wallet, tickers
) -> Tuple[float, float]:
est_stake = 0.0
est_bot_stake = 0.0
- 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"