Showing 514 of 516 total issues
Avoid too many return
statements within this function. Open
return float(pnl * factor)
Avoid too many return
statements within this function. Open
return stoploss_value
Avoid too many return
statements within this function. Open
return 0.0
Avoid too many return
statements within this function. Open
return float(pnl * factor)
Avoid too many return
statements within this function. Open
return 0.0
Avoid too many return
statements within this function. Open
return (True, 0)
Avoid too many return
statements within this function. Open
return kv.int_value
Avoid too many return
statements within this function. Open
return __price_to_precision_significant_digits(
Avoid too many return
statements within this function. Open
return price
Avoid too many return
statements within this function. Open
return floor(ticks) / (10**ndigits)
Avoid too many return
statements within this function. Open
return val
Function load_params_from_file
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def load_params_from_file(self) -> Dict:
filename_str = getattr(self, "__file__", "")
if not filename_str:
return {}
filename = Path(filename_str).with_suffix(".json")
- 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 _force_entry_validations
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _force_entry_validations(self, pair: str, order_side: SignalDirection):
if not self._freqtrade.config.get("force_entry_enable", False):
raise RPCException("Force_entry not enabled.")
if self._freqtrade.state != State.RUNNING:
- 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 6 (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 confirm_trade_entry
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def confirm_trade_entry(
self,
pair: str,
order_type: str,
amount: float,
- 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 deep_merge_dicts
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def deep_merge_dicts(source, destination, allow_null_overrides: bool = True):
"""
Values from Source override destination, destination is returned (and modified!!)
Sample:
>>> a = { 'first' : { 'rows' : { 'pass' : 'dog', 'number' : '1' } } }
- 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_pairlist
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fetch_pairlist(self) -> Tuple[List[str], float]:
headers = {"User-Agent": "Freqtrade/" + __version__ + " Remotepairlist"}
if self._bearer_token:
headers["Authorization"] = f"Bearer {self._bearer_token}"
- 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 _rpc_force_exit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _rpc_force_exit(
self, trade_id: str, ordertype: Optional[str] = None, *, amount: Optional[float] = None
) -> Dict[str, str]:
"""
Handler for forceexit <id>.
- 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 validate_stake_amount
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def validate_stake_amount(
self,
pair: str,
stake_amount: Optional[float],
min_stake_amount: Optional[float],
- 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 __informative_pairs_freqai
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __informative_pairs_freqai(self) -> ListPairsWithTimeframes:
"""
Create informative-pairs needed for FreqAI
"""
if self.config.get("freqai", {}).get("enabled", 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"