mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-19127 Fixed: __prepare__ magic function not hightlights
Add __prepare__ to py3 builtin methods
This commit is contained in:
@@ -392,6 +392,7 @@ public class PyNames {
|
||||
.put("__bool__", _only_self_descr)
|
||||
.put("__bytes__", _only_self_descr)
|
||||
.put("__format__", new BuiltinDescription("(self, format_spec)"))
|
||||
.put("__prepare__", new BuiltinDescription("(metacls, name, bases)"))
|
||||
.put("__round__", new BuiltinDescription("(self, n=None)"))
|
||||
.put(DUNDER_NEXT, _only_self_descr)
|
||||
.build();
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
class C:
|
||||
def __prepare__(metacls, name, bases):
|
||||
@@ -0,0 +1,2 @@
|
||||
class C:
|
||||
def __prep<caret>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -160,6 +160,11 @@ public class Py3CompletionTest extends PyTestCase {
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON35, () -> doTest());
|
||||
}
|
||||
|
||||
// PY-17828
|
||||
public void testDunderPrepare() {
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON30, this::doTest);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return super.getTestDataPath() + "/completion";
|
||||
|
||||
Reference in New Issue
Block a user