Skip to content

Commit cbda64c

Browse files
authored
Merge pull request #13 from Lithe-IDEA/feat/python-settings-interpreter-view
feat(settings): Python 设置页显示当前解释器、补上隐藏类型错误,发布 1.1.0
2 parents a527c0a + e3756db commit cbda64c

26 files changed

Lines changed: 3255 additions & 506 deletions

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
- name: Install pytest for the host suite
117117
run: python -m pip install --disable-pip-version-check pytest
118118
- name: Verify Python highlighting, run configurations, and dependencies on Lithe 0.8.9
119-
run: node scripts/e2e-host.mjs --ref 4d1b88f03f243356c855299464baa2647cc57226 --run '^TestPythonSupportPlugin(GrammarHighlighting|RunCurrentFile(InterpreterOverride)?|ManualRunAndDependencies)$'
119+
run: node scripts/e2e-host.mjs --ref 4d1b88f03f243356c855299464baa2647cc57226 --run '^TestPythonSupportPlugin(GrammarHighlighting|RunCurrentFile(PinnedInterpreter)?|ManualRunAndDependencies)$'
120120
- name: Run the full Python host suite on the pinned desktop
121121
env:
122122
GOFLAGS: -tags=vivahead

‎README.md‎

Lines changed: 171 additions & 129 deletions
Large diffs are not rendered by default.

‎backend/src/main.rs‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ mod discovery;
44
mod inspect;
55
mod pyrefly;
66
mod requirements;
7-
mod settings_preview;
7+
mod view;
88

99
use lithe_plugin_sdk::Backend;
1010

@@ -20,11 +20,8 @@ fn main() {
2020
.expect("the inspect function ID is valid")
2121
.suppress_success_diagnostics(inspect::FUNCTION)
2222
.expect("the inspect function is registered")
23-
.view(settings_preview::FUNCTION, settings_preview::draw)
24-
.expect("the preview function ID is valid")
25-
.suppress_success_diagnostics(settings_preview::FUNCTION)
26-
.expect("the preview function is registered")
2723
.toolchain_provider("python", discovery::query)
2824
.expect("the Python provider ID is valid");
25+
view::register(&mut backend).expect("the view function is valid");
2926
std::process::exit(backend.listen());
3027
}

‎backend/src/pyrefly.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ impl LaunchResolver {
3333
enum_setting(settings, "diagnosticMode", &["openFilesOnly", "workspace"]);
3434
let mut python = json!({
3535
"pyrefly": {
36-
"typeCheckingMode": enum_setting(settings, "typeCheckingMode", &["default", "auto", "basic", "strict", "all", "off"]),
37-
"displayTypeErrors": enum_setting(settings, "displayTypeErrors", &["force-on", "default", "error-missing-imports", "force-off"]),
36+
"typeCheckingMode": enum_setting(settings, "typeCheckingMode", &["default", "auto", "off", "basic", "legacy", "strict", "all"]),
37+
"disableTypeErrors": settings["disableTypeErrors"].as_bool().unwrap_or(false),
3838
"diagnosticMode": diagnostic_mode,
3939
},
4040
"analysis": {

‎backend/src/settings_preview.rs‎

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)