diff --git a/python/src/com/jetbrains/python/codeInsight/intentions/PyAnnotateTypesIntention.java b/python/src/com/jetbrains/python/codeInsight/intentions/PyAnnotateTypesIntention.java index 3f91a6a692aa..0d0605d527cd 100644 --- a/python/src/com/jetbrains/python/codeInsight/intentions/PyAnnotateTypesIntention.java +++ b/python/src/com/jetbrains/python/codeInsight/intentions/PyAnnotateTypesIntention.java @@ -203,7 +203,7 @@ public class PyAnnotateTypesIntention implements IntentionAction { PyParameter[] params = function.getParameterList().getParameters(); for (int i = params.length - 1; i >= 0; i--) { - if (params[i] instanceof PyNamedParameter) { + if (params[i] instanceof PyNamedParameter && !params[i].isSelf()) { params[i] = annotateParameter(project, editor, (PyNamedParameter)params[i], false); } }