mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use correct first parameter name (PY-1811)
This commit is contained in:
@@ -177,7 +177,7 @@ public class PyOverrideImplementUtil {
|
||||
statementBody.append("(");
|
||||
final LanguageLevel langLevel = ((PyFile)pyClass.getContainingFile()).getLanguageLevel();
|
||||
if (!langLevel.isPy3K()) {
|
||||
statementBody.append(pyClass.getName()).append(", self");
|
||||
statementBody.append(pyClass.getName()).append(", ").append(PyUtil.getFirstParameterName(baseFunction));
|
||||
}
|
||||
statementBody.append(").").append(baseFunction.getName()).append("(");
|
||||
startIndex = 1;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
class A(object):
|
||||
@classmethod
|
||||
def m(cls):
|
||||
pass
|
||||
|
||||
class B(A):
|
||||
<caret>pass
|
||||
@@ -0,0 +1,10 @@
|
||||
class A(object):
|
||||
@classmethod
|
||||
def m(cls):
|
||||
pass
|
||||
|
||||
class B(A):
|
||||
@classmethod
|
||||
def m(cls):
|
||||
<selection>super(B, cls).m()</selection>
|
||||
|
||||
@@ -42,6 +42,10 @@ public class PyOverrideTest extends PyLightFixtureTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testClassmethodNewStyle() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testPy3k() {
|
||||
PythonLanguageLevelPusher.setForcedLanguageLevel(myFixture.getProject(), LanguageLevel.PYTHON31);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user