Skip to content

Commit

Permalink
Fix import with -OO (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbell10 authored Jul 23, 2021
1 parent 50eab92 commit 480443e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
missing version query functions.
https://github.com/joblib/threadpoolctl/pull/88

- Fixed an attribute error when python is run with -OO.
https://github.com/joblib/threadpoolctl/pull/87

2.2.0 (2021-07-09)
==================
Expand Down
3 changes: 2 additions & 1 deletion threadpoolctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ class _dl_phdr_info(ctypes.Structure):

def _format_docstring(*args, **kwargs):
def decorator(o):
o.__doc__ = o.__doc__.format(*args, **kwargs)
if o.__doc__ is not None:
o.__doc__ = o.__doc__.format(*args, **kwargs)
return o

return decorator
Expand Down

0 comments on commit 480443e

Please sign in to comment.