Fix default settings entry for basedpyright (#40812)
If you set `{"basedpyright": {"analysis": {"typeCheckingMode":
"off"}}}`, you will notice that it doesn't actually work, but
`{"basedpyright.analysis": {"typeCheckingMode": "off"}}` does.
Made the change on how the default is being set.
Release Notes:
- N/A
This commit is contained in:
@@ -1866,12 +1866,8 @@ impl LspAdapter for BasedPyrightLspAdapter {
|
|||||||
}
|
}
|
||||||
// Basedpyright by default uses `strict` type checking, we tone it down as to not surpris users
|
// Basedpyright by default uses `strict` type checking, we tone it down as to not surpris users
|
||||||
maybe!({
|
maybe!({
|
||||||
let basedpyright = object
|
let analysis = object
|
||||||
.entry("basedpyright")
|
.entry("basedpyright.analysis")
|
||||||
.or_insert(Value::Object(serde_json::Map::default()));
|
|
||||||
let analysis = basedpyright
|
|
||||||
.as_object_mut()?
|
|
||||||
.entry("analysis")
|
|
||||||
.or_insert(Value::Object(serde_json::Map::default()));
|
.or_insert(Value::Object(serde_json::Map::default()));
|
||||||
if let serde_json::map::Entry::Vacant(v) =
|
if let serde_json::map::Entry::Vacant(v) =
|
||||||
analysis.as_object_mut()?.entry("typeCheckingMode")
|
analysis.as_object_mut()?.entry("typeCheckingMode")
|
||||||
|
|||||||
Reference in New Issue
Block a user