mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
handle os.path.realpath in PyPathEvaluator (PY-9787)
This commit is contained in:
@@ -70,6 +70,7 @@ public class PyNames {
|
||||
public static final String DIRNAME = "dirname";
|
||||
public static final String ABSPATH = "abspath";
|
||||
public static final String NORMPATH = "normpath";
|
||||
public static final String REALPATH = "realpath";
|
||||
public static final String JOIN = "join";
|
||||
public static final String REPLACE = "replace";
|
||||
public static final String FILE = "__file__";
|
||||
|
||||
@@ -41,7 +41,8 @@ public class PyPathEvaluator extends PyEvaluator {
|
||||
else if (call.isCalleeText(PyNames.JOIN) && args.length >= 1) {
|
||||
return evaluatePathInJoin(args, args.length);
|
||||
}
|
||||
else if (call.isCalleeText(PyNames.NORMPATH) && args.length == 1) {
|
||||
else if (call.isCalleeText(PyNames.NORMPATH, PyNames.REALPATH) && args.length == 1) {
|
||||
// we don't care about the exact transformation performed by python but need to preserve the availability of the path
|
||||
return evaluate(args[0]);
|
||||
}
|
||||
else if (call.isCalleeText(PyNames.ABSPATH) && args.length == 1) {
|
||||
|
||||
Reference in New Issue
Block a user