Skip to content

Commit 34897bc

Browse files
maerteijnmartinaljhossbach
authored
Fix wrong formatting in TOML dict
Fix incorrect formatting after loading toml dict --------- Co-authored-by: Martin Sandve Alnæs <[email protected]> Co-authored-by: Julian Hossbach <[email protected]>
1 parent c5727e1 commit 34897bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pylsp_ruff/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,8 @@ 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+
if "tool" in toml_dict and "ruff" in toml_dict["tool"]:
571+
config_in_pyproject = True
572572
except tomllib.TOMLDecodeError:
573573
log.warn("Error while parsing toml file, ignoring config.")
574574

0 commit comments

Comments
 (0)