Show More
@@ -2111,13 +2111,15 class InteractiveShell(SingletonConfigurable): | |||
|
2111 | 2111 | fn = self.find_cell_magic(magic_name) |
|
2112 | 2112 | if fn is None: |
|
2113 | 2113 | lm = self.find_line_magic(magic_name) |
|
2114 |
etpl = "Cell magic |
|
|
2114 | etpl = "Cell magic `%%{0}` not found{1}." | |
|
2115 | 2115 | extra = '' if lm is None else (' (But line magic `%{0}` exists, ' |
|
2116 | 2116 | 'did you mean that instead?)'.format(magic_name)) |
|
2117 | 2117 | error(etpl.format(magic_name, extra)) |
|
2118 | 2118 | elif cell == '': |
|
2119 | raise UsageError('%%{0} (with double %) expects code beneath it. ' | |
|
2120 | 'Did you mean %{0} (single %)?'.format(magic_name)) | |
|
2119 | message = '%%{0} is a cell magic, but the cell body is empty.'.format(magic_name) | |
|
2120 | if self.find_line_magic(magic_name) is not None: | |
|
2121 | message += ' Did you mean the line magic %{0} (single %)?'.format(magic_name) | |
|
2122 | raise UsageError(message) | |
|
2121 | 2123 | else: |
|
2122 | 2124 | # Note: this is the distance in the stack to the user's frame. |
|
2123 | 2125 | # This will need to be updated if the internal calling logic gets |
General Comments 0
You need to be logged in to leave comments.
Login now