PyDocstringTypeInspection doesn't work on plain text docstrings like PyDocstringInspe...
authorMikhail Golubev <mikhail.golubev@jetbrains.com>
Tue, 22 Sep 2015 12:56:37 +0000 (15:56 +0300)
committerMikhail Golubev <mikhail.golubev@jetbrains.com>
Tue, 22 Sep 2015 15:44:09 +0000 (18:44 +0300)
python/src/com/jetbrains/python/inspections/PyDocstringTypesInspection.java

index 2826dc8d6b6f199d4190e5ffa25c8e4979c872c8..fc500948f6ee2aef09981acf8b001d8bc66e8c9a 100644 (file)
@@ -24,6 +24,7 @@ import com.jetbrains.python.debugger.PySignature;
 import com.jetbrains.python.debugger.PySignatureCacheManager;
 import com.jetbrains.python.debugger.PySignatureUtil;
 import com.jetbrains.python.documentation.docstrings.DocStringUtil;
+import com.jetbrains.python.documentation.docstrings.PlainDocString;
 import com.jetbrains.python.psi.PyElementGenerator;
 import com.jetbrains.python.psi.PyFunction;
 import com.jetbrains.python.psi.PyStringLiteralExpression;
@@ -89,7 +90,7 @@ public class PyDocstringTypesInspection extends PyInspection {
       }
 
       StructuredDocString docString = DocStringUtil.parse(text, function);
-      if (docString == null) {
+      if (docString instanceof PlainDocString) {
         return;
       }