Skip to content

Commit

Permalink
Build with Eclipse 2024-03 and add a bit more info to mypy console ou…
Browse files Browse the repository at this point in the history
…tput.
  • Loading branch information
fabioz committed May 4, 2024
1 parent 75572bd commit 17c7a03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ void createMypyProcess(IExternalCodeAnalysisStream out)
}
}
}

String mypyPath = StringUtils.join(SimpleRunner.getPythonPathSeparator(), addToMypyPath);
if (addToMypyPath.size() > 0) {
WriteToStreamHelper.write("MyPy: Using MYPYPATH:", out, mypyPath);
updateEnv = new ICallback<String[], String[]>() {

@Override
Expand All @@ -213,14 +216,14 @@ public String[] call(String[] arg) {
// Update var
if (arg[i].startsWith("MYPYPATH=")) {
arg[i] = arg[i] + SimpleRunner.getPythonPathSeparator()
+ StringUtils.join(SimpleRunner.getPythonPathSeparator(), addToMypyPath);
+ mypyPath;
return arg;
}
}

// Create new var.
return ArrayUtils.concatArrays(arg, new String[] {
"MYPYPATH=" + StringUtils.join(SimpleRunner.getPythonPathSeparator(), addToMypyPath) });
"MYPYPATH=" + mypyPath });
}
};
}
Expand All @@ -241,9 +244,9 @@ public String[] call(String[] arg) {
}
cmdList.add(0, "mypy");
String[] args = cmdList.toArray(new String[0]);
WriteToStreamHelper.write("MyPy: Executing command line:", out, "python", "-m", args);
SimplePythonRunner runner = new SimplePythonRunner();
String[] parameters = SimplePythonRunner.preparePythonCallParameters(interpreter, "-m", args);
WriteToStreamHelper.write("MyPy: Executing command line:", out, StringUtils.join(" ", parameters));

Tuple<Process, String> r = runner.run(parameters, workingDir, nature, monitor, finalUpdateEnv);
return r.o1;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<tycho-version>4.0.3</tycho-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<repository.id>eclipse-2023-12</repository.id>
<repository.url>https://download.eclipse.org/releases/2023-12/</repository.url>
<repository.url>https://download.eclipse.org/releases/2024-03/</repository.url>
</properties>
<prerequisites>
<maven>3.9.5</maven>
Expand Down

0 comments on commit 17c7a03

Please sign in to comment.