ranaroussi / quantstats

Function with cyclomatic complexity higher than threshold PY-R1000
Anti-pattern
Minor
6 occurrences in this check
plot_table has a cyclomatic complexity of 17 with "high" risk
1111    return None
1112
1113
1114def plot_table(1115    tbl,
1116    columns=None,
1117    title="",
plot_rolling_beta has a cyclomatic complexity of 28 with "very-high" risk
 736    return None
 737
 738
 739def plot_rolling_beta( 740    returns,
 741    benchmark,
 742    window1=126,
plot_rolling_stats has a cyclomatic complexity of 25 with "high" risk
 607    return None
 608
 609
 610def plot_rolling_stats( 611    returns,
 612    benchmark=None,
 613    title="",
plot_histogram has a cyclomatic complexity of 25 with "high" risk
 403    return None
 404
 405
 406def plot_histogram( 407    returns,
 408    benchmark,
 409    resample="M",
plot_timeseries has a cyclomatic complexity of 39 with "very-high" risk
 240    return None
 241
 242
 243def plot_timeseries( 244    returns,
 245    benchmark=None,
 246    title="Returns",
plot_returns_bars has a cyclomatic complexity of 31 with "very-high" risk
  92    return colors, ls, alpha
  93
  94
  95def plot_returns_bars(  96    returns,
  97    benchmark=None,
  98    returns_label="Strategy",