- Use '/' key to quickly access this field.
- Enter a name of repository, or repository group for quick search.
- Prefix query to allow special search:
user:admin, to search for usernames, always global
user_group:devops, to search for user groups, always global
pr:303, to search for pull request number, title, or description, always global
commit:efced4, to search for commits, scoped to repositories or groups
file:models.py, to search for file paths, scoped to repositories or groups
For advanced full text search visit: repository search
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.