vheon / JediHTTP

Simple http wrapper around jedi
Apache License 2.0
40 stars 9 forks source link

[READY] Add /names endpoint #23

Closed micbou closed 8 years ago

micbou commented 8 years ago

This PR adds a new endpoint that exposes the jedi.names method from Jedi API. I am going to use it in ycmd to extract all modules imported in current file and preload them as proposed in this ycm-users thread. It may also be useful for semantic highlighting.

I did some refactoring by adding a _FormatCompletions function similar to its definitions counterpart and I replaced the has_length + has_items combination by contains or contains_inanyorder in the tests since this is equivalent.

I updated the examples in the README to reflect the current structures used in the code. I also replaced the single quotes by double quotes as single quotes are not valid JSON.


This change is Reviewable

vheon commented 8 years ago

Sorry for the delayed response.

:lgtm: @homu r+


Reviewed 4 of 4 files at r1. Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

homu commented 8 years ago

:pushpin: Commit 3a537c2 has been approved by vheon

homu commented 8 years ago

:zap: Test exempted - status

micbou commented 8 years ago

It looks like homu messed up the commit description because of my GPG signature. What's strange is that it doesn't happen on YCM and ycmd repositories. Did you configure something differently with the bot?

vheon commented 8 years ago

Yes, I don't want the merge bubble, maybe is that 😕

micbou commented 8 years ago

This bug is reported on homu repository but is unlikely to be fixed. I could disable my signature for this repository to avoid that.

micbou commented 8 years ago

Are you going to amend the commit message? I am asking that because I have other PRs planned and it would be better to fix the message before if you decide to do so.

vheon commented 8 years ago

Yes, I hope not to break anyone (I don't think anyone else uses this but who knows 😜 )

vheon commented 8 years ago

I've amended the commit message and force pushed.