ranaroussi / quantstats

Branches of the if statement have similar implementation PTC-W0051
Anti-pattern
Major
3 years ago3 years old
All branches in the conditional structure have implementation
110    axes[1].set_ylabel('Drawdown', fontname=fontname,
111                       fontweight='bold', fontsize=12)
112    axes[1].set_yticks(_np.arange(-ddmin, 0, step=ddmin_ticks))
113    axes[1].plot(dd, color=colors[2], lw=1 if grayscale else 1, zorder=1)114    axes[1].axhline(0, color='silver', lw=1, zorder=0)
115    if not grayscale:
116        axes[1].fill_between(dd.index, 0, dd, color=colors[2], alpha=.1)