BUG: Opening parenthesis after non-callable raises ValueError

Typing something like `None(` raises a value error.
Merge pull request #2830 from punchagan/fix-format-tooltip

BUG: Opening parenthesis after non-callable raises ValueError