##// END OF EJS Templates
validate ESC_PAREN ('/') is followed by a callable name and not empty (#12690)...
validate ESC_PAREN ('/') is followed by a callable name and not empty (#12690) When running a single python expression with just a slash - `/`, a tuple is returned. ```python In [1]: / Out[1]: () ``` This weird case happens because when a line starts with `/` the `inputtransformer` transforms it into a call of the first word after the `/` as the callable name and rest tokens after as arguments. This PR fixes that issue by validating that at least a callable name is given and it's not empty, if not a `SyntaxError` will be raised. ```python In [1]: / File "<ipython-input-1-8f27084b6294>", line 1 / ^ SyntaxError: invalid syntax In [2]: ``` Validated that tests are passing.
M Bussonnier -
r28936:b65cf89c merge
Show More
Name Size Modified Last Commit Author
/ IPython / terminal
pt_inputhooks
shortcuts
tests
__init__.py Loading ...
console.py Loading ...
debugger.py Loading ...
embed.py Loading ...
interactiveshell.py Loading ...
ipapp.py Loading ...
magics.py Loading ...
prompts.py Loading ...
ptutils.py Loading ...