Python doesn't allow raising functions as exceptions but PyLint still has a check for it here. Under what conditions can the above line of code be hit?
I tried raising an exception like:
def test_func():
"""Test-only function for checking function objects can be raised."""
pass
raise test_func
But Python raises an error: "exceptions must be old-style classes or derived from BaseException, not type"