Skip to content

Commit cdf930b

Browse files
gselzerclaude
andcommitted
Fold PythonSyntax into PythonSyntaxLanguageServer
The syntax-only server was its analysis's only user, so the two are one class now: the analysis (analyze, Context, Kind) is package-private, for the tests. The dialect is the plugin's, so ApposePythonServerPlugin keeps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 479ee7c commit cdf930b

4 files changed

Lines changed: 464 additions & 514 deletions

File tree

‎src/main/java/org/scijava/plugins/scripting/appose/python/completion/ApposePythonServerPlugin.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050
* Once a script's environment is built (by running the script), jedi
5151
* analyzes the script against it, so its packages are known; packages the
5252
* script declares but its environment lacks are installed for completion only
53-
* (see
54-
* {@link org.scijava.plugins.scripting.appose.python.completion.DependencyOverlays}).
53+
* (see {@link DependencyOverlays}).
5554
* Both see the script as plain Python, its parameters declared with the
5655
* types they have when it runs (e.g. images as NumPy arrays; see
5756
* {@link #dialect()}).
@@ -69,6 +68,8 @@ public class ApposePythonServerPlugin implements LanguageServerPlugin {
6968
/** How many completions get signatures, once a word is begun. */
7069
private static final int SIGNATURES = 30;
7170

71+
private static final ApposePythonDialect DIALECT = new ApposePythonDialect();
72+
7273
@Parameter
7374
private LanguageServerService servers;
7475

@@ -90,7 +91,7 @@ public LanguageServer create(final Environment environment) {
9091

9192
@Override
9293
public ScriptDialect dialect() {
93-
return PythonSyntaxLanguageServer.DIALECT;
94+
return DIALECT;
9495
}
9596

9697
/** Whether jedi-language-server is offered. */

0 commit comments

Comments
 (0)