-
Notifications
You must be signed in to change notification settings - Fork 45
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
Test that classes without arguments contain parentheses in signature #182
Conversation
Ensure consistency with function signatures that contain no arguments.
I just saw cfd2e7a#r60582938. I've moved this as a draft until I understand what's happening in the specific example. |
This commit is helpful for consistent syntax highlighting for classes. A current Jedi limitation is that Jedi will not return signatures for classes with no arguments. For this reason, we explicitly append empty parens in such cases for consistency.
@pappasam I wasn't able to reproduce what you described in cfd2e7a#r60582938 😕. FWIW, I use https://github.com/ericvw/dotfiles/blob/main/neovim/.config/nvim/lua/config/lsp.lua#L37-L47. I'm happy to investigate further. If you prefer me to drop the revert and keep the test case, I can do that as well. |
@ericvw no worries, and I appreciate all your efforts! Like you, I like to keep the code as simple as possible. Here's a screenshot of the Here's a screenshot of the same location from 8fe8340 (the current Notice how, in the current Note: I'm using |
😄
I do see the difference in the two screenshots. I sense there is something deeper going on. When I use the
If you don't mind keeping this PR open while, I would like to see if I can replicate what you are observing with To help me out, how do you set up your development for this project? I roughly do the following:
I'll start looking into this more tomorrow and setting up |
This tells me there might be a difference between our operating systems. I'm using Linux Mint 20.2; are you on an Ubuntu-based OS? Or something else? The difference may come down to Jedi's understanding of compiled C extensions, which will differ between operating systems. |
@pappasam, you are correct that it is related to I'll keep the test case in this PR and drop the revert commit. I'll explore what is going on with Jedi and Cythoniozed |
PR has been updated with just the test case addition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
I discovered davidhalter/jedi#1749 😢. It doesn't appear to support for |
Hey, @pappasam I noticed cfd2e7a and added a test case that I think covers the situation you were describing.
In my testing, it appears that.description()
does include the parenthesis from Jedi. I hope you don't mind me reverting cfd2e7a towards keeping the code path simple now that there is a test in place. If there is a different situation that you are running into, I'm happy to iterate on the PR and ensure that case is covered.