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

PR: Return types for CompiledObjects using docstrings.py #818

Closed
wants to merge 1 commit into from

Conversation

bcolsen
Copy link
Contributor

@bcolsen bcolsen commented Dec 17, 2016

This pull request in conjunction with PR: #796 for numpydoc returns in docstrings solves issue #372 for numpy complied objects. This makes completions functions numpy.array to return an numpy.ndarray object resulting in returns like this:

>>> import jedi; jedi.Script('import numpy as np; np.array([1,2,3]).a').completions()
[<Completion: all>,
 <Completion: any>,
 <Completion: argmax>,
 <Completion: argmin>,
 <Completion: argpartition>,
 <Completion: argsort>,
 <Completion: astype>]

I have not yet written a test since I need to import numpy to do such. A standard python library with complied objects and sphinx documentation would be a better test.

@@ -196,9 +203,12 @@ def name(self):
return FakeName(name, self)

def _execute_function(self, params):
from jedi.evaluate import docstrings
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is necessary due to cyclical importing of CompliedObject in analysis.py which is import by docstrings.py through iteratable.py

@ccordoba12
Copy link

@bcolsen, could you update #796 and this one to work with the new 0.10.0?

@bcolsen
Copy link
Contributor Author

bcolsen commented Feb 5, 2017

@ccordoba12, I can look at getting the spyder jedi patch to work for both Jedi 0.9.0 and 0.10.0.

If needed, I could work on #796 but I'm not familiar with the googledocs stuff. I'm also going to wait on this PR until #796 goes through.

@ccordoba12
Copy link

@ccordoba12, I can look at getting the spyder jedi patch to work for both Jedi 0.9.0 and 0.10.0

Yes, that'd be great, thanks!

@bcolsen
Copy link
Contributor Author

bcolsen commented Feb 14, 2017

Closing this because I submitted PR: #868 that includes an updated version of this code.

@bcolsen bcolsen closed this Feb 14, 2017
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