mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
hook for providing type of 'with' block variables; provide type for contextlib.closing
This commit is contained in:
@@ -28,4 +28,7 @@ public interface PyTypeProvider {
|
||||
|
||||
@Nullable
|
||||
PyType getIterationType(PyClass iterable);
|
||||
|
||||
@Nullable
|
||||
PyType getContextManagerVariableType(PyClass contextManager, PyExpression withExpression, TypeEvalContext context);
|
||||
}
|
||||
|
||||
@@ -96,6 +96,12 @@ public class PyTypeProviderBase implements PyTypeProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public PyType getContextManagerVariableType(PyClass contextManager, PyExpression withExpression, TypeEvalContext context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void registerSelfReturnType(String classQualifiedName, Collection<String> methods) {
|
||||
registerReturnType(classQualifiedName, methods, mySelfTypeCallback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user