mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Handle 'mode' as a keyword argument to open() as well
This commit is contained in:
@@ -135,7 +135,10 @@ public class PyStdlibTypeProvider extends PyTypeProviderBase {
|
||||
for (Map.Entry<PyExpression, PyNamedParameter> entry : arguments.entrySet()) {
|
||||
final PyNamedParameter parameter = entry.getValue();
|
||||
if ("mode".equals(parameter.getName())) {
|
||||
final PyExpression argument = entry.getKey();
|
||||
PyExpression argument = entry.getKey();
|
||||
if (argument instanceof PyKeywordArgument) {
|
||||
argument = ((PyKeywordArgument)argument).getValueExpression();
|
||||
}
|
||||
if (argument instanceof PyStringLiteralExpression) {
|
||||
mode = ((PyStringLiteralExpression)argument).getStringValue();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user