Skip to content

Commit 2a9ea3b

Browse files
committed
ENH: Add computed backtesting.__all__
1 parent adcc5f3 commit 2a9ea3b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

backtesting/backtesting.py

+11
Original file line numberDiff line numberDiff line change
@@ -1763,3 +1763,14 @@ def plot(self, *, results: pd.Series = None, filename=None, plot_width=None,
17631763
reverse_indicators=reverse_indicators,
17641764
show_legend=show_legend,
17651765
open_browser=open_browser)
1766+
1767+
1768+
# NOTE: Don't put anything public below this __all__ list
1769+
1770+
__all__ = [getattr(v, '__name__', k)
1771+
for k, v in globals().items() # export
1772+
if ((callable(v) and v.__module__ == __name__ or # callables from this module
1773+
k.isupper()) and # or CONSTANTS
1774+
not getattr(v, '__name__', k).startswith('_'))] # neither marked internal
1775+
1776+
# NOTE: Don't put anything public below here. See above.

0 commit comments

Comments
 (0)