Showing 501 of 503 total issues
Function get_analyzed_dataframe
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_analyzed_dataframe(self, pair: str, timeframe: str) -> Tuple[DataFrame, datetime]:
"""
Retrieve the analyzed dataframe. Returns the full dataframe in trade mode (live / dry),
and the last 1000 candles (up to the time evaluated at this moment) in all other modes.
:param pair: pair to get the data for
- 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 _download_pair_history
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _download_pair_history(
pair: str,
*,
datadir: Path,
exchange: Exchange,
- 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_markets
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. 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
Function print_results
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def print_results(
Function _replace_external_df
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _replace_external_df(
Function _check_empty_df
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _check_empty_df(
Function get_dry_market_fill_price
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_dry_market_fill_price(
Function __init__
has a Cognitive Complexity of 8 (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 ohlcv_to_dataframe
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ohlcv_to_dataframe(
Function _validate_pairdata
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _validate_pairdata(
Function _dry_is_price_crossed
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _dry_is_price_crossed(
Function _load_cached_data_for_updating
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _load_cached_data_for_updating(
Function _get_stake_amount_limit
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_stake_amount_limit(
Function refresh_latest_ohlcv
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def refresh_latest_ohlcv(
Function get_ui_download_url
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_ui_download_url(version: Optional[str] = None) -> Tuple[str, str]:
base_url = "https://api.github.com/repos/freqtrade/frequi/"
# Get base UI Repo path
resp = requests.get(f"{base_url}releases", timeout=req_timeout)
- 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 _add_external_df
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _add_external_df(
Function market_is_tradable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def market_is_tradable(self, market: Dict[str, Any]) -> bool:
"""
Check if the market symbol is tradable by Freqtrade.
Ensures that Configured mode aligns to
"""
- 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 check_conflicting_settings
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. 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
Function validate_config_schema
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def validate_config_schema(conf: Dict[str, Any], preliminary: bool = False) -> Dict[str, Any]:
"""
Validate the configuration follow the Config Schema
:param conf: Config in JSON format
:return: Returns the config if valid, otherwise throw an exception
- 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
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],