Skip to content

Commit 8c09951

Browse files
committed
fix: dd_stats variable name typo in reports.py (#502)
Fix NameError in reports.full() caused by accidental find-and-replace during v0.0.80 lazy import refactoring. 🤖 Generated with Claude Code
1 parent 5d06402 commit 8c09951

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Changelog
22
===========
33

4+
0.0.81
5+
------
6+
7+
**Hotfix Release**
8+
9+
- Fixed `NameError: name 'dd_get_stats' is not defined` in `reports.full()` (#502)
10+
- Root cause: Accidental find-and-replace during v0.0.80 lazy import refactoring changed `dd_stats` to `dd_get_stats()`
11+
- Fix: Restored correct variable name `dd_stats` in `_calc_dd()` function
12+
413
0.0.80
514
------
615

quantstats/reports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ def _calc_dd(df, display=True, as_pct=False):
22552255
dd_stats["Max Drawdown %"] = dd_stats["Max Drawdown %"].astype(float) * pct
22562256
dd_stats["Avg. Drawdown %"] = dd_stats["Avg. Drawdown %"].astype(float) * pct
22572257

2258-
return dd_get_stats().T
2258+
return dd_stats.T
22592259

22602260

22612261
def _html_table(obj, showindex="default"):

quantstats/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.0.80"
1+
version = "0.0.81"

0 commit comments

Comments
 (0)