I recently upgraded to PyCharm 2.7, and I've noticed that PyCharm now has special processing for code examples inside a docstring. For example, if I have a class like the following:
"""Process some data.
As long as I preface code examples with ">>> " or "... ", PyCharm now highlights the code example and performs syntax checks and code inspections. This might be useful in, say, the context of doctests.
Unfortunately, I'm finding that the inspections don't handle this code very well (for example, in the above code, some_function will be considered an "unresolved reference," even if I define it elsewhere in the module), and in general I don't really care about the syntax or coding practices I use in example code.
So is there a way to turn off inspections of code examples in docstrings? I understand why it might be useful for people who use doctests, but I sometimes just put examples in docstrings and don't want them to be inspected.