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

completions: skip docstr without preview, handle exceptions #958

Merged
merged 1 commit into from Oct 20, 2019

Conversation

blueyed
Copy link
Collaborator

@blueyed blueyed commented Oct 19, 2019

Closes #948.

@blueyed blueyed mentioned this pull request Oct 19, 2019
d["info"] = PythonToVimStr(c.docstring())
except Exception:
print("jedi-vim: error with docstring for %r: %s" % (
c, traceback.format_exc()))
Copy link
Owner

Choose a reason for hiding this comment

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

Just wondering: Do we need that? Or is this already covered by the generic error handling and you just want to know a bit more about the error (essentially the added c information)?

Otherwise I think this is a good change. Not sure though how many people aren't using preview. How about you?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not using preview, but it is enabled by default IIRC.
I've thought it is good to log/print errors (otherwise we might have never noticed that it fails with parts of numpy in the first place likely). It will only show up with :mess though.
The decorator would only print it when not swallowed (what is done here now).

@blueyed blueyed merged commit 08f13af into davidhalter:master Oct 20, 2019
@blueyed blueyed deleted the completions-opt branch October 20, 2019 21:56
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.

Some modules not found
2 participants