From d2f7a5102a37cfd748c17800179debd3de5953cc Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Sat, 24 Dec 2022 11:54:39 +0100 Subject: [PATCH] symbols: ensure proper document match to avoid empty outline ... also if module_path is not a Path --- pylsp/plugins/symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylsp/plugins/symbols.py b/pylsp/plugins/symbols.py index 939dcda6..d5925dbf 100644 --- a/pylsp/plugins/symbols.py +++ b/pylsp/plugins/symbols.py @@ -91,7 +91,7 @@ def pylsp_document_symbols(config, document): else: continue - if _include_def(d) and Path(document.path) == d.module_path: + if _include_def(d) and Path(document.path) == Path(d.module_path): tuple_range = _tuple_range(d) if tuple_range in exclude: continue