Skip to content

Commit 6567670

Browse files
authored
Merge pull request #254 from minrk/optimized-doc
handle when python -OO removes docstrings
2 parents 608c712 + 36acbfd commit 6567670

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

jupyter_client/blocking/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ def wrapped(self, *args, **kwargs):
4646

4747
return self._recv_reply(msg_id, timeout=timeout)
4848

49+
if not meth.__doc__:
50+
# python -OO removes docstrings,
51+
# so don't bother building the wrapped docstring
52+
return wrapped
53+
4954
basedoc, _ = meth.__doc__.split('Returns\n', 1)
5055
parts = [basedoc.strip()]
5156
if 'Parameters' not in basedoc:

0 commit comments

Comments
 (0)