Is it possible to hint PyCharm that method is always raising exception to calm "uninitialized variable" warnings?

With twisted framework and generators-based async coding style it is common to have code like that:

    result = yield some_async_method()
except SomeException:


PyCharm is correctly pointing that `do_something(result)` might use uninitialized variable `result`. But I know that this is ok since `returnValue` is always raising an exception, so we never get past this try...except with unitialized `result`. Is it possible to give PyCharm a hint about this particular function is never returning and always raising exception?



1 comment
Comment actions Permalink

Interested in this as well... Any solution?


Please sign in to leave a comment.