From 03ddb3a2d3e7a29eaa1a52f9d7c0a534d391b0f5 Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Wed, 27 Aug 2014 16:55:11 +0400 Subject: [PATCH] fixed PY-9690 Show 'Insert documentation string stub' only on function name --- .../codeInsight/intentions/PyGenerateDocstringIntention.java | 1 + 1 file changed, 1 insertion(+) diff --git a/python/src/com/jetbrains/python/codeInsight/intentions/PyGenerateDocstringIntention.java b/python/src/com/jetbrains/python/codeInsight/intentions/PyGenerateDocstringIntention.java index 7acfc9716fea..ca7ec65f9908 100644 --- a/python/src/com/jetbrains/python/codeInsight/intentions/PyGenerateDocstringIntention.java +++ b/python/src/com/jetbrains/python/codeInsight/intentions/PyGenerateDocstringIntention.java @@ -69,6 +69,7 @@ public class PyGenerateDocstringIntention extends BaseIntentionAction { if (function == null || statementList != null) { return false; } + if (!elementAt.equals(function.getNameNode())) return false; return isAvailableForFunction(project, function); }