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