Skip to content

Commit f88df2a

Browse files
committed
TOML dicts are formatted {"tool" {"ruff": {..}}}
And not as {"tool.ruff": {..}}
1 parent 926f50d commit f88df2a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pylsp_ruff/plugin.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,10 @@ def load_settings(workspace: Workspace, document_path: str) -> PluginSettings:
567567
try:
568568
with open(pyproject_file[0], "rb") as f:
569569
toml_dict = tomllib.load(f)
570-
if "tool.ruff" in toml_dict:
571-
config_in_pyproject = True
570+
571+
if "tool" in toml_dict and "ruff" in toml_dict["tool"]:
572+
config_in_pyproject = True
573+
572574
except tomllib.TOMLDecodeError:
573575
log.warn("Error while parsing toml file, ignoring config.")
574576

0 commit comments

Comments
 (0)