Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure proper document match to avoid empty outline (Symbols) #318

Merged
merged 1 commit into from
Dec 28, 2022

Conversation

mnauw
Copy link
Contributor

@mnauw mnauw commented Dec 24, 2022

... also if module_path is not a Path

Mileage may vary, but at least on my setup some sprinkled logging shows that d.module_path is not a Path (but rather string), so the comparison turns False, and so the result is an empty outline. Wrapping it in Path should make it work whether or not it is a Path.

@mnauw
Copy link
Contributor Author

mnauw commented Dec 24, 2022

As a sidenote, this has only become relevant since the change in commit 8fda905, since before that this was handled by os.path.samefile.

@ccordoba12 ccordoba12 changed the title symbols: ensure proper document match to avoid empty outline Ensure proper document match to avoid empty outline (Symbols) Dec 24, 2022
@ccordoba12 ccordoba12 added this to the v1.7.0 milestone Dec 24, 2022
@ccordoba12
Copy link
Member

Thanks @mnauw for your help with this! Looks good to me but I'd like to ask @rear1019 what he thinks about it given that he was the one that made the Path comparison in the first place.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mnauw! I'm going to merge this because it looks good to me and we need it for 1.7.0.

@ccordoba12 ccordoba12 merged commit 0487a06 into python-lsp:develop Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants