Warning on possible uncaught exception


is there a code inspection function in PyCharm that would warn me if I don't surround function that throws exception with try-except statement? Example shown below.

I know that similar functionality exists in InteliJ IDEA so I'm surprised that I haven't found it in PyCharm.

Comment actions Permalink

Comparing to IntelliJ IDEA, often Java requires to you either catch or throw the exception. There's no such requirement in Python.

However feel free to suggest this as feature request: https://youtrack.jetbrains.com/issues/py


Please sign in to leave a comment.