Skip to content

Commit

Permalink
python_magic needs to handle none_on_fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Blank committed Sep 8, 2014
1 parent 537e1ff commit f86cd69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jupyter_kernel/magics/python_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ def get_completions(self, info):
completions = [before + c.name_with_symbols for c in completions]
return completions

def get_help_on(self, info, level=0):
def get_help_on(self, info, level=0, none_on_fail=False):
"""Implement basic help for functions"""

if not info['rest']:
return ''
return None if none_on_fail else ''

last = info['obj']

default = 'No help available for "%s"' % last
default = None if none_on_fail else ('No help available for "%s"' % last)

parts = last.split('.')

Expand Down

0 comments on commit f86cd69

Please sign in to comment.