Skip to content

Commit 52aa5a0

Browse files
committed
BUG: bf28ddd BUG: functools.partial objects do not always have a __module__ attr in Python 3.9
Fixes #1232 Thanks #1249
1 parent 9c93ad2 commit 52aa5a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backtesting/lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def optimize(self, **kwargs) -> pd.DataFrame:
639639

640640
__all__ = [getattr(v, '__name__', k)
641641
for k, v in globals().items() # export
642-
if ((callable(v) and v.__module__ == __name__ or # callables from this module
642+
if ((callable(v) and getattr(v, '__module__', None) == __name__ or # callables from this module
643643
k.isupper()) and # or CONSTANTS
644644
not getattr(v, '__name__', k).startswith('_'))] # neither marked internal
645645

0 commit comments

Comments
 (0)